(CNN) -- Barcelona's unbeaten run under new coach Tito Vilanova came to an unexpected halt on Wednesday as the Spanish side failed to clinch a place in the knockout stage of the European Champions League after losing 2-1 at Celtic.
Lionel Messi's late goal, his 74th of 2012, proved a mere consolation as the Scottish champions celebrated a famous victory to mark 125 years of existence.
The result left Barca still on top of Group G, while Celtic's hopes of reaching the last 16 were greatly improved as a first-half goal from Victor Wanyama and an 83rd-minute strike from teenage substitute Tony Watt put Neil Lennon's team in second place with two games left.
Spartak Moscow dropped to the bottom of the group after losing 2-0 at Benfica, with Oscar Cardozo scoring both second-half goals for the Portuguese team.
The Paraguay striker then missed a penalty, hitting the crossbar after Argentine defender Nicolas Pareja was sent off.
Barcelona traveled to Parkhead as the only team from Europe's top leagues still unbeaten this season following weekend defeats for Juventus and Paris Saint-Germain, but went behind in the 21st minute when Kenyan midfielder Wanyama headed in Charlie Mulgrew's corner.
The 18-year-old Watt, making his first appearance in Europe's top club competition, made it 2-0 after veteran midfielder Xavi failed to cut out a long clearance by Celtic keeper Fraser Forster.
Messi netted at the start of injury time after an initial block by Forster but Barca could not repeat the last-gasp heroics of Celtic's visit to the Nou Camp last month, when Vilanova's team snatched a 2-1 victory.
It was one of the biggest results in Celtic's history, behind winning the European Cup in 1967 and losing in the final three years later.
"It's right up there, one of the proudest nights in my career," Lennon told reporters. "It was a monumental effort from all those players and on the anniversary of club, it's a very special occasion.
"I wanted them to do themselves justice and they've even surpassed that, they've beaten the best club in the world.
"You try to weather the storm, you know it's coming and there's not a lot you can do. Then young Tony comes on, gives us new lease of life and scores a great second goal, and he'll go down in history now."
Another unbeaten run came to an end as Barcelona's conquerors in last season's final, Chelsea, boosted hopes of reaching the last 16 after stealing a 3-2 win at home to Shakhtar Donetsk in the fourth minute of injury time.
Substitute Victor Moses headed in Juan Mata's corner to avenge last month's 2-1 defeat away to the Ukrainian league leaders, who paid for defensive lapses at Stamford Bridge.
The English team took the lead in the sixth minute when Spain striker Fernando Torres charged down an attempted clearance by goalkeeper Andriy Pyatov following a poor backpass by Yaroslav Rakitskiy.
Longtime Chelsea target Willian leveled in the ninth minute but fellow Brazilian midfielder Oscar gave the home team the halftime advantage with a superb long-range volley after Pyatov - racing out of his area -- headed a clearance straight into his path.
Willian equalized again straight after the break with an almost carbon copy of his first goal, this time with his left foot, but Chelsea hit back again as John Obi Mikel had a goal ruled out for offside and then 21-year-old Nigeria forward Moses followed up his goal in Saturday's Premier League draw with Swansea.
It left Shakhtar on top of Group E on goal difference from Chelsea, with Juventus a point adrift in third following a 4-0 win at home to Nordsjaelland.
The Italian champions ended a run of nine successive draws in European competition as Claudio Marchisio, Arturo Vidal and Sebastian Giovinco scored in the first half, while second-half substitute Fabio Quagliarella headed the other against the Danish league winners.
Manchester United ensured there would be no repeat of last season's embarrassment by booking a place in the last 16 with two matches to spare after a 3-1 win at Portuguese club Braga.
United failed to qualify from a group including Benfica, Basel and Otelul Galati as manager Alex Ferguson paid the price for resting his big names, but this time there has been no mistake with four wins from four in Group H.
Braga led through Alan's early penalty, but substitute Robin van Persie leveled before Wayne Rooney scored a penalty and a third forward, Javier Hernandez, bundled in another as United matched the late comeback in the 3-2 win at Old Trafford two weeks ago.
Braga dropped to the bottom of the group after Galatasaray joined Cluj on four points with a 3-1 win in Romania.
Turkey striker Burak Yilmaz scored a hat-trick to earn his club's first win of the European campaign.
Bayern Munich moved top of Group H with a 6-1 hammering of Lille that ended the French club's hopes of qualification.
Peru striker Claudio Pizarro scored a 16-minute first-half hat-trick as the Germans went above Valencia on goal difference, with Bastian Schweinsteiger, Arjen Robben and substitute Toni Kroos adding the others.
Valencia moved up to second place with a 4-2 win at home to BATE Borisov, having led 3-0 after 51 minutes with goals from Jonas, Roberto Soldado -- who netted a penalty -- and Sofiane Feghouli.
Renan Bressan and Dmitri Mozolevski replied but Feghouli's second in the 86th-minute condemned the Belorussian champions to a second successive defeat.