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.
Live Text Commentary
Full Time The referee ends the match.90:00 +2:41
Gary Glen produces a right-footed shot from inside the six-yard box and bounces off the post.90:00 +1:11
Marius Zaliukas gives away a free kick for an unfair challenge on David MacKay. Direct free kick taken by Alan Mannus.90:00 +0:01
Andrew Driver produces a header from deep inside the six-yard box which goes wide of the right-hand upright.89:40
A cross is delivered by Andrew Driver, clearance made by Frazer Wright.88:16
Daniel Grainger produces a cross, save by Alan Mannus.86:30
Marius Zaliukas challenges David McCracken unfairly and gives away a free kick. Frazer Wright restarts play with the free kick.83:32
Inswinging corner taken from the right by-line by Liam Craig.83:21
Francisco Sandaza takes a shot. Blocked by Marius Zaliukas.80:40
Chris Millar produces a header from deep inside the six-yard box that clears the bar.80:03 Substitution
Substitution Murray Davidson goes off and Chris Millar comes on.77:16 Booking
Booking Andy Webster receives a caution for unsporting behaviour.77:04 Booking
Booking Jody Morris is cautioned by the ref for unsporting behaviour.76:26 Goal scored
Goal! - Francisco Sandaza - St J'stone 2 - 1 Hearts Power penalty scored by Francisco Sandaza. St Johnstone 2-1 Hearts.75:14 Booking
Booking Daniel Grainger is given a yellow card.74:42
Penalty awarded for an unfair challenge on Francisco Sandaza by Marius Zaliukas.74:15
The ball is sent over by Suso Santana, Alan Mannus makes a save.72:50
Free kick awarded for a foul by Liam Craig on Jamie Hamill. Jamie Hamill takes the direct free kick.72:38
The ball is sent over by Daniel Grainger, blocked by David MacKay.71:00
Darren Barr gives away a free kick for an unfair challenge on Murray Davidson. Frazer Wright takes the direct free kick.
Jamie Hamill is ruled offside. Indirect free kick taken by Alan Mannus.66:58 Substitution
Substitution Jamie Hamill is brought on as a substitute for Jason Holt.66:33 Substitution
Substitution Suso Santana on for Arvydas Novikovas.64:48
The ball is sent over by Arvydas Novikovas, clearance by Murray Davidson.62:17
Effort on goal by Darren Barr from outside the area goes harmlessly over the bar.58:54
Corner taken right-footed by Daniel Grainger.58:29
Outswinging corner taken left-footed by Daniel Grainger from the left by-line, Frazer Wright makes a clearance.57:43
Strike comes in from Daniel Grainger from the free kick, Jody Morris gets a block in.57:43 Booking
Booking Frazer Wright shown a yellow card.57:21
Murray Davidson concedes a free kick for a foul on Gary Glen.56:27
Gary Glen concedes a free kick for a foul on Alan Maybury. Alan Maybury takes the direct free kick.52:40
Lee Croft is caught offside. Indirect free kick taken by Mark Ridgers.50:17
Free kick awarded for a foul by Daniel Grainger on Jody Morris. Alan Mannus takes the free kick.49:04
Arvydas Novikovas delivers the ball, Alan Mannus makes a save.47:06
Inswinging corner taken left-footed by Liam Craig from the right by-line, clearance by Andy Webster.46:56
Francisco Sandaza takes a shot. Blocked by Andy Webster.46:15
Unfair challenge on Andrew Driver by Cillian Sheridan results in a free kick. Free kick crossed left-footed by Daniel Grainger from left wing, clearance made by Alan Maybury.45:01
The match restarts for the second half.45:01 Substitution
Substitution Mark Ridgers replaces Jamie MacDonald.45:00 +0:20 Half time
Half Time The first half comes to an end.45:00 +0:07
Liam Craig crosses the ball, blocked by Daniel Grainger.42:32
The ball is crossed by Andrew Driver, David McCracken makes a clearance.40:18
Inswinging corner taken by Liam Craig, Scott Robinson makes a clearance.40:10
Lee Croft produces a cross, Marius Zaliukas gets a block in.38:15
Inswinging corner taken left-footed by Daniel Grainger, clearance by David MacKay.36:27
The ball is sent over by Liam Craig, blocked by Daniel Grainger.34:25
Francisco Sandaza provided the assist for the goal.34:25 Goal scored
Goal! - Murray Davidson - St J'stone 1 - 1 Hearts Murray Davidson finds the net with a goal from inside the penalty area to the bottom left corner of the goal. St Johnstone 1-1 Hearts.31:47
Free kick awarded for a foul by Arvydas Novikovas on Murray Davidson. Free kick crossed by Liam Craig.30:35
A cross is delivered by Cillian Sheridan.28:50
Ryan McGowan provided the assist for the goal.28:50 Goal scored
Goal! - Jason Holt - St J'stone 0 - 1 Hearts Jason Holt scores a goal from close range to the bottom right corner of the goal. St Johnstone 0-1 Hearts.27:51
Free kick awarded for a foul by Darren Barr on Murray Davidson. Alan Maybury takes the direct free kick.26:06
Corner taken right-footed by Lee Croft, save made by Jamie MacDonald.23:53
Jody Morris concedes a free kick for a foul on Arvydas Novikovas. Free kick taken by Jamie MacDonald.22:11
Corner taken left-footed by Liam Craig from the right by-line, Andy Webster fouled by Frazer Wright, the ref awards a free kick. Jamie MacDonald takes the direct free kick.21:53
Alan Maybury delivers the ball, clearance made by Daniel Grainger.20:40
Marius Zaliukas sends in a cross, blocked by Murray Davidson.19:55
Unfair challenge on Jason Holt by Murray Davidson results in a free kick. Free kick taken by Andy Webster.19:19
The assistant referee signals for offside against Lee Croft. Jamie MacDonald takes the indirect free kick.18:35
Daniel Grainger challenges Lee Croft unfairly and gives away a free kick. David MacKay restarts play with the free kick.18:02
The assistant referee signals for offside against Gary Glen. Free kick taken by Alan Mannus.16:33
Alan Maybury delivers the ball, Daniel Grainger manages to make a clearance.13:33
Corner taken by Lee Croft, clearance by Andy Webster.13:01
Inswinging corner taken by Liam Craig, save by Jamie MacDonald.9:40
Gary Glen produces a cross.9:06
The assistant referee flags for offside against Francisco Sandaza. Free kick taken by Jamie MacDonald.7:39
A cross is delivered by Jody Morris, Andy Webster manages to make a clearance.6:55
Shot by Jody Morris. Save made by Jamie MacDonald.6:24
Arvydas Novikovas gives away a free kick for an unfair challenge on Murray Davidson. Free kick crossed left-footed by Liam Craig, clearance made by Marius Zaliukas.4:57
Free kick awarded for a foul by Liam Craig on Arvydas Novikovas. Free kick taken by Andy Webster.3:16
Jason Holt has an effort at goal from just outside the box which goes wide of the left-hand post.1:34
The ball is swung over by Andrew Driver.0:53
Liam Craig takes a shot. Save by Jamie MacDonald.0:31
Corner taken right-footed by Lee Croft, Daniel Grainger makes a clearance.0:12
The ball is delivered by Liam Craig, Marius Zaliukas makes a clearance.0:00
The match gets underway.
Live data and text provided by our data suppliers