St Mirren lifted their first major silverware in more than a quarter of a century as they came from behind to beat Hearts in a thrilling Scottish League Cup final.
Ryan Stevenson's deflected shot put Hearts ahead in 10 minutes and a John Sutton header and Mehdi Taouil shot should have added to their lead.
But Esmael Goncalves and Steven Thompson struck either side of half-time to stun Gary Locke's side.
Conor Newton rounded off a sweet move with a thunderous strike for Saints' third and though Stevenson added a late second in a frantic closing period, the Buddies clung on.
This was the Paisley's side's first success in the tournament and will go a long way to erasing painful memories of losing to nine-man Rangers in the 2010 final.
St Mirren showed early nerves, with Hearts forcing a series of rushed clearances but the teams were, in truth, still at the getting-to-know-you stage when Stevenson sent the fans from Edinburgh into raptures with the opening goal.
Marc MacAusland and Jim Goodwin took turns to crunch into tackles to stop the maroon advance but the latter's challenge screwed to the unmarked Stevenson, who kept his head as two St Mirren players raced back in vain to support left-back Paul Dummett.
The Hearts midfielder's shot deflected off the Englishman and spun past the helpless Craig Samson.
Gary Teale offered respite down the wing as St Mirren sought a leveller, with Kevin McHattie often relying on Danny Wilson as covering centre-back to limit the threat of an incursion into goalkeeper Jamie MacDonald's box.
St Mirren skipper Jim Goodwin lifts the League Cup after an entertaining final
Yet with 21 minutes on the clock Hearts could, and probably should, have doubled their lead. Jamie Walker sped down the left wing and sent in a curling cross reminiscent of John Robertson in his prime at Nottingham Forest.
Sutton rushed to meet it and headed the ball against the post from a tight angle.
MacDonald made his first save of the match soon after, a regular gathering of a tame Goncalves shot from 25 yards, and did well to claw away a John McGinn inswinging corner in 32 minutes.
Between those incidents Hearts again came close to a second goal. Playmaker Mehdi Taouil waltzed past three static Saints and shot across goal with even the telescopic legs of Michael Ngoo unable to stab it home.
Any Hearts fans fearing those missed chances would haunt them would have been in need of an exorcism when St Mirren equalised.
Teale was already running at full pelt when Thompson played a killer pass down the inside-right channel.
Frozen Hearts looked for offside, Teale looked for Goncalves, and his pass across the area allowed the Portuguese to side-foot home with confidence.
How that invigorated St Mirren. After the interval they moved into the lead with their first attack, Dummett crossing for Thompson who lashed the ball past MacDonald from 12 yards for a cup final goal for his boyhood heroes.
Taouil's trickery looked like Hearts' most likely route to pulling level. The Buddies defence was mesmerised as the little Moroccan tip-toed his way through them on the right and smashed a cross that could have gone anywhere when it deflected off Ngoo.
Interview - St Mirren boss Danny Lennon
It produced a good save and a corner rather than a goal and Ngoo powered a header a yard over from the set-piece.
For all Hearts' first-half superiority they could have been all but killed off with half an hour to go had Dylan McGowan not blocked a Thompson strike, with Paul McGowan firing the rebound wide.
Ngoo and Walker were the main instigators of an attempted fightback as they tried to pierce the Saints defence but the next goal came at the other end, producing a raucous response among the 17,000 Buddies fans and a moment of delirium for their manager Danny Lennon.
On-loan Newcastle midfielder Newton worked a one-two with Goncalves on the edge of the box and smashed the return ball early from 16 yards to deny MacDonald the chance to narrow the angle.
Arvydas Novikovas had come on for Walker before Saints' third, with Jason Holt replacing Darren Barr as Locke tried to freshen up his team for the closing stages.
But with Taouil also subbed it was McHattie and Stevenson who rose to the challenge to try to drag Hearts level.
The former won two challenges outside the St Mirren box and stung the palms of Samson with a controlled drive, then Stevenson stole in at the back post to shoot but his effort skimmed off the crossbar.
He was not to be denied for long, though, as he set up a nail-biting final four minutes with an angled shot that lacked power but somehow crept past the slow-to-react Samson and into the bottom corner.
The keeper redeemed himself when he denied the same player a minute from time at his near post and St Mirren hung on to spark wild celebrations among their nerve-shredded fans.
Booking John Sutton is shown a yellow card for unsporting behaviour.
Free kick awarded for an unfair challenge on Graham Carey by Andy Webster.
The assistant referee signals for offside against Sam Parkin. Jamie MacDonald takes the free kick.
Michael Ngoo gives away a free kick for an unfair challenge on David van Zanten. Craig Samson restarts play with the free kick.
90:00 +1:00 Substitution
Substitution Esmael Goncalves goes off and Lee Mair comes on.
Ryan Stevenson takes a shot. Save by Craig Samson. Ryan Stevenson produces a left-footed shot from inside the area and strikes the post.
Jason Holt has an effort at goal from outside the area missing to the wide left of the goal.
Short corner worked by Esmael Goncalves, Short corner taken by Graham Carey.
Free kick awarded for a foul by Dylan McGowan on Esmael Goncalves. Free kick taken by Graham Carey.
The assist for the goal came from Michael Ngoo.
84:23 Goal scored
Goal - Ryan Stevenson - St Mirren 3 - 2 Hearts Ryan Stevenson grabs a goal from deep inside the penalty box to the bottom right corner of the goal. St Mirren 3-2 Hearts.
Ryan Stevenson takes a shot.
Booking The referee books Gary Teale for dissent.
Booking Ryan Stevenson receives a yellow card for dissent.
Kevin McHattie takes a shot. Save by Craig Samson.
Substitution Graham Carey comes on in place of John McGinn.
Substitution (Hearts) makes a substitution, with Dale Carrick coming on for Mehdi Taouil.
Substitution Steven Thompson goes off and Sam Parkin comes on.
Michael Ngoo challenges Jim Goodwin unfairly and gives away a free kick. Direct free kick taken by Craig Samson.
Unfair challenge on John Sutton by Jim Goodwin results in a free kick. Free kick crossed by Kevin McHattie.
Conor Newton gives away a free kick for an unfair challenge on Jason Holt. Mehdi Taouil takes the direct free kick.
John McGinn challenges Dylan McGowan unfairly and gives away a free kick. Direct free kick taken by Andy Webster.
Michael Ngoo is penalised for a handball. Craig Samson takes the free kick.
Free kick awarded for a foul by Jim Goodwin on Mehdi Taouil. Kevin McHattie takes the direct free kick.
Craig Samson restarts play with the free kick.
Substitution (Hearts) makes a substitution, with Jason Holt coming on for Darren Barr.
Booking The referee cautions Michael Ngoo for unsporting behaviour.
Free kick awarded for a foul by Michael Ngoo on Paul McGowan.
Danny Wilson challenges Esmael Goncalves unfairly and gives away a free kick. Free kick taken by David van Zanten.
Assist on the goal came from Esmael Goncalves.
65:14 Goal scored
Goal - Conor Newton - St Mirren 3 - 1 Hearts Conor Newton gets on the score sheet with a goal from the edge of the penalty area to the bottom right corner of the goal. St Mirren 3-1 Hearts.
Darren Barr challenges Paul McGowan unfairly and gives away a free kick. Paul McGowan takes the direct free kick.
Unfair challenge on Steven Thompson by Andy Webster results in a free kick. Free kick taken by Paul Dummett.
Craig Samson takes the free kick.
Substitution Arvydas Novikovas joins the action as a substitute, replacing Jamie Walker.
Free kick awarded for an unfair challenge on Jim Goodwin by Ryan Stevenson.
The offside flag is raised against Steven Thompson. Danny Wilson takes the indirect free kick.
Paul McGowan has an effort at goal from just outside the box which goes wide of the left-hand post.
Corner taken by Gary Teale from the right by-line.
Mehdi Taouil takes a shot. Comfortable save by Craig Samson.
Inswinging corner taken left-footed by Kevin McHattie from the right by-line, Michael Ngoo has a headed effort from close range and clears the bar.
Jamie Walker fouled by David van Zanten, the ref awards a free kick. Free kick crossed left-footed by Kevin McHattie from left wing.
Paul McGowan concedes a free kick for a foul on Mehdi Taouil. Free kick taken by Mehdi Taouil.
Jamie Walker has an effort at goal from outside the penalty box which goes wide right of the target.
Kevin McHattie takes the inswinging corner, Marc McAusland manages to make a clearance. Corner taken by Kevin McHattie from the right by-line, clearance made by Gary Teale.
Paul Dummett provided the assist for the goal.
45:52 Goal scored
Goal - Steven Thompson - St Mirren 2 - 1 Hearts Steven Thompson grabs a goal from deep inside the penalty box to the top left corner of the goal. St Mirren 2-1 Hearts.
The second half has started.
45:00 +1:25 Half time
Half Time It is the end of the first-half.
The assistant referee flags for offside against Esmael Goncalves. Jamie MacDonald takes the indirect free kick.
Michael Ngoo takes a shot from just outside the penalty area which clears the crossbar.
The offside flag is raised against Esmael Goncalves. Jamie MacDonald restarts play with the free kick.
The assistant referee flags for offside against Gary Teale. Jamie MacDonald takes the free kick.
John Sutton is flagged offside by the assistant referee. Craig Samson restarts play with the free kick.
John McGinn concedes a free kick for a foul on Ryan Stevenson. The ball is sent over by Kevin McHattie, John Sutton has an effort at goal from just outside the box which goes wide of the right-hand upright.
Booking Esmael Goncalves shown a yellow card.
Gary Teale provided the assist for the goal.
36:41 Goal scored
Goal - Esmael Goncalves - St Mirren 1 - 1 Hearts Esmael Goncalves scores a goal from deep inside the penalty box to the bottom right corner of the goal. St Mirren 1-1 Hearts.
The referee blows for offside against Esmael Goncalves. Andy Webster takes the indirect free kick.
Michael Ngoo challenges Marc McAusland unfairly and gives away a free kick. Craig Samson restarts play with the free kick.
The ball is sent over by Esmael Goncalves, Headed effort from deep inside the penalty area by Steven Thompson misses to the right of the target.
Inswinging corner taken by John McGinn from the right by-line played to the near post, clearance made by Darren Barr. Inswinging corner taken by John McGinn, save by Jamie MacDonald.
A cross is delivered by Mehdi Taouil.
Michael Ngoo concedes a free kick for a foul on Marc McAusland. Craig Samson takes the free kick.
Jim Goodwin is penalised for handball and concedes a free kick. Kevin McHattie crosses the ball from the free kick left-footed from right channel, Craig Samson makes a save.
Free kick awarded for an unfair challenge on Ryan Stevenson by John McGinn. Jamie MacDonald takes the free kick.
Dylan McGowan concedes a free kick for a foul on Esmael Goncalves. Jim Goodwin takes the free kick.
Corner taken by Jamie Walker, save by Craig Samson.
Esmael Goncalves takes a shot. Save by Jamie MacDonald.
Michael Ngoo concedes a free kick for a foul on Jim Goodwin. Free kick taken by Craig Samson.
Free kick awarded for a foul by Marc McAusland on Jamie Walker. Free kick crossed right-footed by Jamie Walker, save made by Craig Samson.
Free kick awarded for a foul by John McGinn on John Sutton. Free kick taken by Kevin McHattie.
John Sutton has a headed effort at goal from close in that hits the post.
The referee blows for offside against Esmael Goncalves. Free kick taken by Jamie MacDonald.
Darren Barr has an effort at goal from just outside the box which goes wide of the right-hand post.
Steven Thompson concedes a free kick for a foul on Danny Wilson. Kevin McHattie restarts play with the free kick.
Free kick awarded for a foul by Danny Wilson on Steven Thompson. Jim Goodwin takes the free kick.
Foul by David van Zanten on Kevin McHattie, free kick awarded. Jamie MacDonald restarts play with the free kick.
Ryan Stevenson fouled by Paul McGowan, the ref awards a free kick. Kevin McHattie takes the direct free kick. The official flags Steven Thompson offside. Jamie MacDonald takes the indirect free kick.
9:18 Goal scored
Goal - Ryan Stevenson - St Mirren 0 - 1 Hearts Ryan Stevenson scores a goal from inside the area to the bottom left corner of the goal. St Mirren 0-1 Hearts.
Shot from just outside the box by Paul McGowan misses to the left of the goal.
David van Zanten challenges Jamie Walker unfairly and gives away a free kick. Kevin McHattie restarts play with the free kick.
Esmael Goncalves fouled by Dylan McGowan, the ref awards a free kick. Free kick taken by Jim Goodwin.
Foul by Paul McGowan on Ryan Stevenson, free kick awarded. Free kick taken by John Sutton.
The referee blows for offside against Steven Thompson. Indirect free kick taken by Andy Webster.
The referee gets the game underway.
Live text and data provided by The Press Association
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.