East Fife were made to pay for a nightmare start as their Betfred Cup hopes were dashed at home to Hearts.
The Methil men conceded twice in a remarkable opening 80 seconds against the Scottish Cup finalists, whose determination to top the group was evident in a sensational opening.
Olly Lee’s double threatened to spark a rout for the Jambos.
However, the Fifers recovered admirably as the first-half progressed and Jack Hamilton gave them hope with a deserved close-range strike before half-time.
The comeback they craved slipped away when Andy Irving drilled in a third for Hearts in the 62nd minute but almost instantly Ryan Wallace pulled another back to restore belief.
With a second penalty claim and a gilt-edged chance that substitute Liam Watt fired wide near the end they could even have snatched a draw.
Fifers boss Darren Young said: “If you take that first minute and a half out of the game, for 89 minutes we were absolutely outstanding.
“Our work-rate and desire was sensational and we created some good chances and we felt we could have had two penalties – one in the first half and one in the second.
“Then we had a great chance with Liam Watt in the last minute.
“The attitude of the players is second to none and, in the end, we’re disappointed not to take it to penalties.”
East Fife took kick-off but lost possession and in the blink of an eye were behind.
Hearts released Euan Henderson into space down the left flank and the youngster’s pace had the home defence on the back foot. His cross was initially missed by Craig Wighton in the centre but Lee ghosted in at the back post to finish coolly.
Just 60 seconds later, Hearts doubled their lead. Elliott Frear stroked in a corner from the right and Lee arrived unmarked at the near post to flash his shot beyond the exposed Jordan Hart.
The Fifers were reeling and an embarrassment was on the cards. But they hauled themselves off the ropes and saved face as time wore on.
After claiming Danny Denholm should have had a penalty, they pulled one back six minutes from the break.
Ryan Wallace blasted in a shot from the edge of the box that goalkeeper Ross Stewart parried and Hamilton was on hand first to bundle in.
Hearts went in search of the first goal after the interval to put daylight between themselves and their hosts and they got it in stunning fashion in the 62nd minute when Irving speared in a magnificent left-foot drive from 30 yards.
But the Fifers were not finished there and just two minutes later were back to within touching distance.
Wallace raced onto a long ball over the top of the static Hearts defence and held off the returning Christophe Berra to shoot beyond Stewart.
Hearts substitute Stephen Kingsley appeared to handle in the box before a grandstand finish but the Fifers failed to find a leveller before the full-time whistle brought relief for Hearts.