Dunfermline produced a tremendous performance to put a dampener on Celtic's celebrations on the day they were presented with the SPL trophy.
Celtic picked up the SPL trophy after the defeat by Dunfermline
Barry Nicholson stunned the home fans with a coolly-taken sidefooted effort from eight yards after good work by Lee Bullen on the left.
Henrik Larsson equalised just after the interval with a near-post header.
But Gary Dempsey struck the winner from 25 yards out with just over half-an-hour left.
Dunfermline keeper Derek Stillie produced a marvellous save to prevent Alan Thompson giving Celtic an early lead.
Aiden McGeady picked the Englishman out at the front post, but his header from eight yards was superbly tipped round the post by Stillie.
Dempsey managed a shot on target at the other end after 12 minutes, but his 20-yard effort lacked the pace and direction to trouble David Marshall.
Celtic were dominating possession but the visitors took a surprise lead after 28 minutes.
Bullen burst up the left wing and his initial cross found Derek Young at the front post, but his shot was charged down by Marshall.
The ball broke back to Bullen and this time he found Nicholson at the back post and the midfielder calmly knocked the ball into the net.
Celtic looked to reply and Chris Sutton struck a sweet volley straight at Stillie from 20 yards.
Dunfermline celebrate Barry Nicholson's opening goal
It took the home side until the second minute of the second half to draw level. McGeady swung in a near-post corner from the left and Larsson out-jumped two defenders to head past Stillie.
Incredibly, though, rather than the expected Celtic onslaught, Dunfermline regained the lead after 59 minutes.
After a period of controlled passing, Dempsey picked the ball up 25 yards out and rifled an unstoppable shot low past Marshall.
A minute later, Celtic could have been level again.
Sutton glanced a header from a Thompson corner onto the post, Stillie reacted superbly to parry Johan Mjallby's fierce effort, and Stan Varga was denied by a combination of the keeper and Gary Mason a couple of yards out.
Thompson and Stillie were booked for an unseemly flare-up after the Celtic player pushed Bullen into the keeper and then stood on Stillie's leg, prompting the Pars player to kick out.
The two went head-to-head but referee Dougie McDonald contented himself with a yellow card apiece.
Dunfermline substitute Noel Hunt was denied by Marshall after 71 minutes having done well to get the better of Mjallby and Varga, while at the other end, McGeady twice came close before being replaced by Craig Beattie.
Beattie was on the park less than a minute when he had a powerful shot pushed away by Stillie and then Varga missed an open goal from three yards.
Celtic penned Dunfermline in for the final 20 minutes but the equaliser was not forthcoming, with Stillie denying Varga right on the final whistle with another stunning save.
Celtic: Marshall, Varga, Mjallby, McManus, Smith, Lennon,
Lambert, Thompson, McGeady, Larsson, Sutton.
Subs: Douglas, Pearson, Wallace, Beattie, Miller.
Dunfermline: Stillie, Bullen, Skerla, Shields, Byrne,
Nicholson, Mason, Dempsey, Darren Young, Derek Young, Mehmet.
Subs: Hunt, Scott Y Thomson, Kilgannon, Grondin, Labonte.
Referee: D McDonald