Graham Carey's wonder strike helped St Mirren leapfrog Hearts and move up to tenth in the Scottish Premier League.
Saints took an early lead in Paisley when Paul McGowan netted from the spot after Darren Barr had fouled Lee Mair.
Carey doubled that advantage with a fantastic dipping effort from 35 yards - his first goal of the season.
Hearts dominated the second half without creating many clear-cut chances, Dylan McGowan and Michael Ngoo going closest.
The encounter served as a dress rehearsal for next month's Scottish Communities League Cup Final.
And if Saints start that Hampden contest as they did in Paisley, they will be more than happy.
Within three minutes, the home side had a spot-kick. Referee Kevin Clancy pointed to the spot when Barr appeared to bundle over Mair at a corner.
McGowan stepped up and scored low to the left corner, sending Jamie MacDonald the wrong way to net his fifth goal of the season.
Not the start Hearts intended, but their young midfielder Jamie Walker despatched an ninth-minute shot goalwards for Craig Samson to deal with and thereby remind the hosts of their threat.
On 37 minutes, Ngoo sprang into life for the visitors to test Samson with a low left-footer from the edge of the box.
Sam Parkin went close for St Mirren soon after, glancing Carey's lovely cross from the left just wide.
But then Carey produced a moment of magic on the stroke of half-time.
The Irish winger picked up the ball in the middle of the park and sent an unstoppable, dipping drive into the back of the net.
Hearts' reaction for the second period was to replace Barr and Arvydas Novikovas with John Sutton and McGowan.
And McGowan was in the thick of the action immediately, heading a corner wide as the visitors began to apply more pressure.
Then on 51 minutes they had a penalty shout of their own when Mair seemed to pull down Sutton, but referee Clancy was unmoved.
With an hour gone, Hearts' Kevin McHattie teed up Walker to fizz in another shot which Samson batted away.
St Mirren were rarely in their opponents half as Ngoo dragged another effort wide in the 71st minute.
But, for all Hearts' possession in the closing stages, none of it was converted into real goalscoring opportunities, allowing St Mirren to get only their second win in 12 games against the Edinburgh side.
Sorry, we were unable to load match stats, please try again.