Moussa Dembele's late goal gave Celtic a deserved 1-0 win over Rangers as they set up a Scottish League Cup final meeting with Aberdeen next month.
Erik Sviatchenko's second-half header was disallowed when referee Craig Thomson ruled he had fouled Clint Hill in the process and it seemed the game would go to extra-time at Hampden Park.
But substitute Leigh Griffiths got the better of Rangers captain Lee Wallace to set up Dembele and he scored with a cheeky flick through goalkeeper Matt Gilks' legs to finally break Celtic's stubborn opponents down.
The result takes Brendan Rodgers to his first final with the club and they will meet Aberdeen for trophy back at Hampden on November 27.
There is no doubt they merit their place in that match and Rodgers will feel his team could have won more comfortably.
Few within the Rangers camp are likely to disagree but they will at least take encouragement from a more purposeful performance than they produced when they lost 5-1 at Celtic Park last month.
Rangers manager Mark Warburton made changes to his team, with Gilks playing as he has done in all of Rangers' League Cup ties this season at Wes Foderingham's expense.
Lee Hodson was also introduced as right-back with James Tavernier was pushed forward and while that certainly worked at times, Celtic still had the better openings.
The game's first talking point saw Barrie McKay fall in the Celtic box and although their fans thought referee Craig Thomson had awarded a penalty, he actually booked the winger for simulation instead.
Celtic had good opportunities to go in front as a Tom Rogic shot deflected off Rob Kiernan and looped just over before Gilks saved from Scott Sinclair and Kiernan blocked Dembele's shot.
Gilks' only action this season has come in this competition and that perhaps showed when his slack pass from Jason Holt went straight to the onrushing Rogic.
The Australia international's first touch was poor, however, and that allowed the keeper to recover the situation.
Soon after, Dembele went down in the area appealing for a penalty after being caught between Clint Hill and Kiernan but the incident was waved away by Thomson.
Undeterred, Celtic came forward once more against a Rangers side which struggled to do the same with any regularity. Rogic bent his effort just past the post from 20 yards before Kierna Tierney's shot was saved.
Five minutes after the restart, Sviatchenko finally had the ball in the net having beaten Hill to it but the goal was ruled out for a foul by the Dane.
Rangers didn't offer much in response at first as Tavernier's volley was held by Craig Gordon but after another Rogic effort went wide, the Ibrox team almost went ahead.
Tavernier shaped to cross into the box with everyone expecting him to pick out Kenny Miller but he found Holt instead, and his shot was only kept out by a stunning block five yards from goal.
Celtic exerted more pressure and in the closing stages, as both teams made changes, and it seemed increasingly like the match would be heading into extra-time.
But the Parkhead side were determined to get the job done within 90 minutes and after Sinclair hit the bar with a free kick, Griffiths was denied while Stuart Armstrong and James Forrest both missed opportunities.
Just as it seemed the game would peter out, Dembele won it with the a moment of genuine quality three minutes from the end.
Griffiths got away from Wallace down the flank and played in a delicious weighted pass for the Frenchman, who did not have to break his stride as he flicked his foot round to score through Gilks' legs.