Hearts beat RFS 2-1 in their Europa Conference League clash at Tynecastle but results elsewhere ended their hopes of reaching the knockout stages.
Lawrence Shankland scored an early goal to put the home side ahead, and Andy Halliday added a second before half time. Despite Kevin Freisenbichler pulling a goal back for RFS, Hearts saw the game out to complete the double over the Latvian champions.
Both sides had suffered disappointment before kick-off when news from the early kick-off in Florence came through. Fiorentina’s 2-1 win over Basaksehir meant the top two places in the group were confirmed and neither Hearts nor RFS could reach the knockout rounds.
That left Hearts playing for pride, and the not inconsiderable prize money on offer for each win, and they made the perfect start, going ahead in the third minute.
Jorge Grant fed Josh Ginnelly and his perfect cross from the right was met by Shankland, who prodded the ball into the net.
RFS weren’t put on the back foot and Mares shot over after the Latvians won a corner, but Hearts soon doubled their lead.
An attack down the left saw the ball cut back to Andy Halliday on the edge of the box and his powerful shot deflected off a Riga defender and skidded into the bottom corner.
Hearts were well on top and Grant forced a smart save from Pavels Steinbors as they chased a third. Stephen Kingsley forced a top-class save from the goalkeeper when his free-kick appeared destined for the top corner.
It wasn’t one-way traffic and Tomas Simkovic had a shot blocked before Craig Gordon had to stop what would have been an own goal by Ginnelly. Soon after, RFS had a goal back.
Confident build-up play brought the Latvians deep into the Hearts half but there didn’t appear to be imminent danger when the ball was worked to Freisenbichler outside the box but he unleashed a fierce shot that arrowed past Gordon.
Hearts started the second half brightly, probing for openings in the RFS defence and keeping the visitors pinned back for spells but it was the Latvians who went close to going level just after the hour mark.
Friesenbichler tried his luck from distance with another powerful strike and this one hit the crossbar with Craig Gordon beaten.
Connor Smith came on for Jorge Grant as Robbie Neilson looked to freshen things up but there was further injury woe for the Tynecastle side when Stephen Kingsley had to come off with what looked like a hamstring injury. Lewis Neilson took his place in defence.
Andrej Ilic drew a save from Gordon as RFS pushed for an equaliser but moments later Hearts hit the woodwork themselves, Shankland’s header coming back off the post before Neilson hit the rebound high and wide.
Hearts had to withstand pressure in the closing minutes but saw off the threat of the Latvians as the clock ticked down. Jagodinskis was sent off for a foul to break up a counter-attack in injury time before the full-time whistle confirmed three points for the hosts.