Hearts hit three extra-time goals in five minutes to finally take revenge for their shock cup exit to Dunfermline back in February.
A header from skipper Christophe Berra and two right-foot rockets from youngster Calum Elliot booked their place in the CIS Cup quarter-finals, but the additional 30 minutes should never have been required after they somehow allowed Dunfermline back into the tie.
Hearts started brightly and they immediately looked sharper than they did in Saturday's limp display at Inverness.
Straight from the kick-off midfielders Laryea Kingston and Michael Stewart worked hard to link up with striker Christian Nade, whose combination of brute strength and quick feet has quickly won over the fans.
Only the pace and positioning of central defender Souleymane Bamba kept Dunfermline's back door bolted, but they were still in the game and in the 24th minute a left-footed half-volley from Nicky Phinn flashed just over.
Hearts eventually edged in front after 34 minutes when Kestutis Ivaskevicius beat two men on the left and crossed for Elliot who was then sent flying by Calum Woods.
Nade scored from the penalty spot for his first goal for his new club.
Dunfermline staged a brief revival at the start of the second half but they were soon under the cosh again as Kingston, Elliot and Nade all missed clear opportunities to kill the Fifers off.
Dunfermline accepted their good fortune and made a late push for an equaliser.
Former Hibs forward Tam McManus clipped the post with a sublime free-kick and moments later midfielder Stephen Simmons stunned his old club by heading the visitors level.
Extra time began with another marvellous McManus free-kick which Steve Banks pushed round the post and, from the corner that followed, substitute Jim Hamilton side-footed fractionally wide.
But that was to prove Dunfermline's last chance.