Aberdeen paid the penalty for losing their nerve as they blew a disastrous shoot-out to kill off their League Cup dream.
Deep into injury-time they only had to game manage for less than 180 seconds to keep alive the bid to emulate the League Cup glory of 2014.
Instead they let Hearts back into the tie and then completely imploded.
How can a team that converted two penalties in regulation time miss all three in a shoot-out?
The penalties from Cosgrove and Niall McGinn were absolutely shocking, blasted high over the bar into the Gorgie family stand.
This was a bitter setback for Aberdeen and they must ensure it does not have repercussions going further into the season.
They must quickly put this behind them and regroup for a key Premiership clash on Saturday.
Rangers at Ibrox is huge. A win and the Reds are just one point behind the multi-million spending Gers. Defeat and the gap becomes a seven-point chasm.
Certainly not insurmountable, but with Rangers a different beast under Steven Gerrard, a huge ask.
An injury-ravaged squad battling for 120 minutes of tough cup action before such heart-wrenching disappointment is not the ideal preparation for Ibrox.
Only the woodwork denied the Jambos after 40 seconds when Uche Ikpeazu burst past the two centrebacks and rattled a vicious 20-yard shot off the underside of the bar which bounced outside the line. Ikpeazu headed the rebound wide.
Aberdeen were ragged at the back and Ryotaro Meshino danced into the box unchallenged to go one on one with Joe Lewis who beat away his shot.
It could have been 2-0 Hearts.
Aberdeen were awarded a penalty when Christophe Berra came too close to Ryan Hedges, clumsily stuck out a leg and brought him down.
COSGROVE sent keeper Joel Pereira the wrong way with a low finish to his left for his 12th goal of the season.
Hearts were gifted an equalizer when Mikey Devlin dived to head low as the ball bounced off the pitch from a Loic Damour cross.
Devlin should have put his boot through it. He misjudged it and the ball skimmed off his head and fell to Steven MACLEAN who shot beyond Lewis.
Aberdeen were awarded a second penalty in the 30th minute when Damour clumsily dived into a challenge with James Wilson and caught his heel.
Again COSGROVE calmly dispatched, firing low to the opposite corner as his first pen.
In the 64th minute Lewis saved a drive from Ikpeazu and in the 73rd minute Leigh shot inches wide.
Two minutes into time added on Jake Mulraney crossed into the box and Craig HALKETT ghosted in to head home to force injury-time.
The Dons nearly scored in the 108th minute when McGinn met a Leigh cross but his six-yard header smacked off the post.
Leading scorer Cosgrove, normally so lethal from the spot, stepped up and blasted high over. Glenn Whelan converted. Then McGinn blasted over – a spot-kick equally as bad as Cosgrove’s.
Michael Smith netted to make it 2-0. On for just two minutes Bruce Anderson bravely stepped up and at least hit the target – but it was saved.
Aidan Keena netted his penalty to take Hearts through to Hampden and leave the 2,000-strong Red Army wondering ‘what if?.
Aberdeen produced a vastly improved performance to the one against Livingston.
Yes, it was full of fight, passion and intent – until the shoot-out.