St Johnstone kept pace in the top six of the Scottish Premier League with a battling victory against Hearts at McDiarmid Park.
Jason Holt opened the scoring for Hearts in the 29th minute, firing in a Ryan McGowan cross.
Fewer than 10 minutes later, Murray Davidson restored party with a fine volley from Dave MacKay's inswinger.
Fransisco Sandaza netted the winner from the spot after Marius Zaliukas felled him inside the area.
The win keeps St Johnstone level on points with fourth-placed Dundee United, although the Saints have a game in hand as they seek to clinch a European slot.
Hearts have yet to secure their top six place, with a five-point advantage over seventh-place Kilmarnock and two rounds of fixtures left before the split.
The visitors, minus the injured Craig Beattie, survived a scare after 26 minutes when Zaliukas was short with a backpass.
Goalkeeper Jamie MacDonald beat Fran Sandaza to the ball but took a fresh air kick and the ball crept past the post.
It was a let-off but Paulo Sergio's side took advantage as they claimed the lead.
Right-back McGowan raced down the right and fired over the perfect cross for Holt to finish from eight yards.
Sandaza almost made the most of a mix-up in the Hearts penalty area as St Johnstone chased the equaliser.
It arrived after 35 minutes as Davidson met Dave Mackay's cross and steered a volley beyond MacDonald.
Zaliukas then did well to cut out Lee Croft's cross as Cillian Sheridan waited to pounce.
Hearts were forced to make a goalkeeping change at half-time, with Mark Ridgers replacing MacDonald.
His goal came under threat straight away as Sandaza raced clear from the halfway line, but his shot was deflected over.
Sheridan fired a shot wide of target as St Johnstone started to pile on the pressure.
St Johnstone defender Frazer Wright was booked for a late tackle on Holt after 57 minutes, then Hearts midfielder Darren Barr blazed over the bar from 30 yards.
With 15 minutes remaining, Sandaza was brought down inside the Hearts penalty area by Zaliukas and referee Steven Mclean had no hesistation in pointing to the spot before the Spaniard stepped up and converted for the winner.
Chris Millar almost added a second for St Johnstone with a looping header, then Andy Driver wasted a good chance to equalise for Hearts in injury-time.
- 15 Mannus
- 02 MacKay
- 05 Wright Booked
- 12 Maybury
- 18 McCracken
- 04 Morris Booked
- 08 Davidson (Millar - 81' )
- 09 Croft
- 10 Craig
- 11 Sheridan
- 21 Sandaza
- 01 Enckelman
- 06 Anderson
- 07 Millar
- 39 Gray
- 22 Oyenuga
- 24 Compton
- 46 Keatings
Heart of Midlothian
- 30 MacDonald (Ridgers - 46' )
- 03 Grainger Booked
- 05 Barr
- 06 Webster Booked
- 17 McGowan
- 26 Zaliukas
- 11 Driver
- 42 Holt (Hamill - 67' )
- 18 Novikovas (Santana - 67' )
- 23 Glen
- 27 Robinson
- 28 Ridgers
- 02 Hamill
- 07 Santana
- 08 Black
- 19 Skacel
- 22 Smith
- 38 Morton