Hearts secured European football for next season after coming from two goals down to beat Livingston 4-2.
Basement team Liv stormed into a two-goal lead after 22 minutes courtesy of Stephen Kelly’s brace.
But Hearts produced an emphatic response to score four goals before the interval, with Jorge Grant, Yutaro Oda, Cammy Devlin and Lawrence Shankland all finding the net.
The victory meant Hearts, who remain 11 points clear in third place, can finish no lower that fourth in the cinch Premiership, while Livingston remain nine points adrift at the bottom.
The big team news pre-match was the return of Craig Gordon in goal for Hearts for the first time in a league match since Christmas Eve 2022.
The 41-year-old goalkeeper’s inclusion was with an eye on next weekend’s Scottish Cup semi-final with Rangers.
But it was a difficult start for Gordon and his team-mates against a Livingston team fighting for their lives.
The Lions started well and wasted a great chance to open the scoring after nine minutes.
Sean Kelly’s pass down the left was missed by Hearts defender Frankie Kent and Tete Yengi came in on the blindside but his tame shot was easily saved by Gordon.
That warning was not heeded by the hosts as the away team stormed into a two-goal lead.
The first came just a minute later when a long ball over the top was intercepted by Gordon outside his area.
But the Scot allowed his touch to get away from him and Stephen Kelly swept a stunning first-time shot into the unguarded net from 40 yards.
The boos rang around Tynecastle in the 22nd minute as Livingston doubled their lead. Kent’s attempted clearance was charged down by Yengi and the ball broke to Stephen Kelly, who slammed a right-footed drive past Gordon from 18 yards.
But Hearts’ response was emphatic as they scored four unanswered goals before half-time.
The first arrived in the 29th minute when Shankland’s left-footed cross was forced in by Grant.
The equaliser was a near mirror imagine as Oda tapped in another Shankland cross at the front post.
Hearts kept coming and added a third with another delivery from the left flank, this time Alex Cochrane’s low pass being squeezed in by Devlin.
And the fourth arrived from the penalty spot in first half stoppage time when Shankland slotted home after Lions goalkeeper Shamal George tripped Oda.
The second half was less eventful although Livingston striker Yengi was shown a second yellow card by referee Colin Steven just seconds after he had been substituted.
Hearts controlled the half and went close through Shankland and Devlin.