Celtic narrowed the gap on Scottish Premier League leaders Rangers to seven points with victory over Dunfermline.
Returning to Parkhead for the first time in four years, the visitors were at fault for early goals scored by Gary Hooper and James Forrest.
But Ki Sung-Yueng missed a penalty in the second half after Forrest had been fouled by Paul Burns.
And Andy Barrowman's 86th minute strike led to a nervous end for the hosts as Celtic held out to secure the win.
Victory means Neil Lennon's side could be within four points of Rangers if they beat St Mirren on Saturday.
The Celtic manager had made two changes to his starting line up following their weekend win over Inverness, with Kris Commons replacing Georgios Samaras and midfielder Ki Sung-Yueng in for Badr El-Kaddouri.
Dunfermline, meanwhile, made three changes with Andy Dowie, Gary Mason and Barrowman in for the injured Austin McCann, Paddy Boyle and Liam Buchanan.
But the Fife side effectively ended their hopes of a fourth away win of the season within the opening quarter-of-an-hour.
Midfielder Paul Willis's loose pass in-field from wide on the left was picked up by Hooper, who raced clear of the stunned defenders before slipping the ball past Paul Gallacher in the Pars goal.
A second followed seven minutes later and was again the result of a Dunfermline mistake.
Alex Keddie gave possession away in the middle of the pitch allowing Celtic to break and, with the Dunfermline defence exposed, Commons found Anthony Stokes inside the box.
Gallacher saved his low drive but Hooper retrieved and picked out Forrest to convert, the youngster coolly guiding the ball into the net from eight yards.
With victory seemingly guaranteed Celtic looked like they were in the mood to work on their goal difference column and could have led by five or six by half-time.
Captain Beram Kayal had a drive from 25 yards which Gallacher blocked with his feet, moments before Commons had an effort from even further out which went high over the bar.
Forrest returned to torment the Dunfermline defence on the half-hour mark, weaving his way through their ranks before crossing to the back post for Stokes who, from an acute angle, could only send it back across the goal to let the Fifers off the hook.
Moments later, the roles were reversed when Forrest was set up by Stokes but the outcome was the same as the Scotland international's low drive skipped past the far post.
Two minutes from the break Hooper became the next Celtic player to pass up on a decent chance when his first-time strike at the edge of the box from Forrest's cross went wide of the target.
Paddy McCourt was the only change at half time, replacing Commons as the home side continued to press Jim McIntyre's side.
But, after suffering a luckless evening, the visitors were offered the opportunity to establish a foothold when Ki missed from the penalty spot in the 54th minute.
Burns felled Forrest on the edge of the box, with referee Bobby Madden pointing instantly to the spot.
After a disagreement with Stokes over who should take the penalty, Ki managed to send Gallacher the wrong way, only to direct his shot wide of the left-hand post.
An aggrieved Stokes was further aggravated moments later when set up by a tremendous Ki pass, the striker's left-footed strike coming off the Dunfermline post.
Dunfermline, whose chances had been limited thus far, increased their energy levels with the introduction of substitute Joe Cardle on the hour mark, the midfielder forcing a double save from Fraser Forster who had an otherwise easy night in goals.
That seemed to inspire more creativity from the Pars and Barrowman's goal reignited the tie with four minutes remaining.
David Graham was the architect, threading through a perfect pass which allowed the striker to take a touch before driving across goal from 15 yards out and landing his shot in the right hand corner of Forsters' net.
But there was to be no dramatic equaliser for McIntyre's men as Celtic protected their 2-1 lead.