Celtic survived a first-half scare to overcome Dunfermline 4-2 at East End Park and book their place in the quarter-finals of the Active Nation Scottish Cup.
After Diomansy Kamara opened the scoring for the visitors, David Graham's strike and an Andy Kirk penalty put the home side ahead before Hoops striker Morten Rasmussen levelled two minutes from the interval.
The Fifers' resistance crumbled in the second half after defender Callum Woods scored an own goal and Celtic substitute Robbie Keane, on for Marc Crosas at the break, scored from the spot for his first goal for the club to ensure a safe passage in to the next round.
Kamara gave the visitors a deserved lead in the 19th minute as Parkhead debutant Edson Braafheid left Willie Gibson down the left-hand side and his cutback was crashed off the bar by Georgios Samaras. The Fifers failed to clear their lines and when the ball eventually fell to Kamara, he thundered a shot from the edge of the box high past Pars goalkeeper Greg Fleming.
However, Celtic's joy was short-lived as less than two minutes later, Nick Phinn found space on the right to cut the ball back for Graham to slide in the equaliser.
The goal stunned the visiting support but there was more drama in the 26th minute when the home side forged ahead through a Kirk penalty. Celtic defender Paul Caddis was adjudged by referee Charlie Richmond to have pushed Steven Bell in the back as he awaited a Phinn cross and when the Celtic protests died down, the Irishman sent Artur Boruc the wrong way from the spot.
In the 43rd minute Rasmussen got Celtic back level when he scooped the ball in from close range at the second attempt, after Parkhead skipper Scott Brown's effort fell kindly to the former Brondby striker.
Keane was welcomed by the travelling support when he appeared at the start of the second half. The visitors, effectively playing with four strikers, swarmed over Dunfermline and in the 54th minute Fleming pulled off a great close-range save from Rasmussen after he could only parry Keane's cutback.
But in the 58th minute Celtic regained the lead when Kamara's cross from the right was turned into his own goal by Woods, with Rasmussen in close attention.
Keane got his first goal for the Hoops in the 67th minute although he had to rely on a dubious penalty, awarded when he was tackled inside the box by Pars skipper Austin McCann. The Irishman calmly sent Fleming the wrong way from the spot before taking the acclaim of the Celtic fans behind the goal.