Gretna's fairytale cup story was cruelly shattered by the width of the bar as Gavin Skelton's missed spot-kick during a penalty shootout meant that Hearts lifted the Scottish Cup for the seventh time in their history.
The match ended 1-1 after extra time with Gretna more then acquitting themselves as worthy finalists and at times displaying the sort of football that could grace the Champions League, instead of their Edinburgh opponents next season.
Hearts wasted no time going on the offensive and tested the Gretna defence seconds into the match. Paul Hartley flashed a ball across the edge of the Gretna box, but the onrushing Edgaras Jankauskas failed to meet the ball with the goal gaping.
Six minutes later and the Jambos support had their heads in their hands as the Edinburgh side were inches away from taking the lead.
Latvian winger Deividas Cesnauskas picked up a loose ball just outside the box and let fly with a rocket of a shot which rebounded back off the upright.
The quality in the Hearts side began to show as the SPL dominated possession with Gretna struggling to get a foot on the ball. Rudi Skacel was ominously beginning to influence the game for Hearts and came close in the 21st minute with a right-foot shot that was well saved by Alan Main at his near post.
Main was called into action four minutes later as eh raced from his line to smother the ball at Hartley's feet after the midfielder had been released by a Roman Bednar flick.
Gretna were not to be outdone and forced Craig Gordon to display his considerable talent from Skelton's 25-yard free-kick that the keeper acrobatically turned the ball over the bar.
Just as the considerable Hearts support were beginning to get a wee bit twitchy, their nerves were put at ease as the Tynecastle club took the lead through Skacel, when Robbie Neilson's throw-in was missed by everyone leaving the Czech midfielder to slot the ball home at the back post.
Gretna were not to be upstaged and almost levelled after the restart when Stevie Tosh raced clean through on goal but tugged his shot wide from 16 yards.
Hearts were beginning to threaten on the counter attack and caught the borders side napping when Skacel played the ball through to Bednar. The striker looked up and spotted Main off his line but the Hearts man's chip sailed over the bar.
Gretna marched straight up the other end with substitute David Graham weaving his way through the Hearts defence and round Gordon, only for Neilson to pull off a fantastic saving tackle on the goal-line.
In the 75th minute, Hearts worst nightmare came true as the plucky Black and Whites pulled level. Ryan McGuffie tumbled in the box and the referee Dougie McDonald awarded a very soft penalty.
McGuffie picked himself up to take the kick which was duly parried by Gordon but the midfielder followed up his effort to slot home the rebound.
Neither side could find the breakthrough needed and the match unexpectedly went into extra-time.
The Jambos had the best of the extra 30 minutes with Jankauskas and Skacel coming very close before the match erupted in controversy in the 116th minute.
Skacel was played clean through on goal with only Main to beat but the Czech international appeared to be impeded by Main en route to goal.
Referee McDonald waived play on with the Hearts players demanding a penalty, so much so that Hartley was booked for his protestations.
The Scotland international's temper was to prove his undoing in the last minute of extra-time as he earned his second yellow for taking an off the ball swipe at Derek Townsley.
Penalties were needed to separate the sides with Steven Pressley, Neilson, Skacel and Michal Pospisil all converting for Hearts. James Grady and Mark Birch were on target for Gretna, but consecutive misses from Townsley and Skelton meant the cup would travel back along the M8 to the West End of Edinburgh.