ROME -- Barcelona slumped to a rare loss Wednesday, while Manchester United and Chelsea each needed late goals to win in a wild night of Champions League action.

Barcelona was unbeaten in 12 consecutive matches in all competitions before falling 2-1 at Celtic, which is now just two points behind the Spanish giants with two group matches remaining.

Meanwhile, United came back from a goal down to beat Braga 3-1 and qualify for the second round in a match that was stopped briefly because of a floodlight outage. Advancing with two matches to spare marked a sharp turnaround from last season, when United failed to make it to the knockout round.

Elsewhere, defending champion Chelsea needed a header from Victor Moses four minutes into injury time to win 3-2 over Shakhtar Donetsk.

Also, last season's runner-up Bayern Munich thrashed Lille 6-1 and Italian champion Juventus also dominated in a 4-0 win over Danish side Nordsjaelland.

In other matches, Galatasaray won its first away match in the competition in 10 years by beating CFR Cluj 3-1 with a hat trick from Burat Yilmaz; midfielder Sofiane Feghouli scored twice to help Valencia beat BATE Borisov 4-2 and take the lead in Group F; and Substitute Oscar Cardozo scored two second-half goals to give Benfica a 2-0 win over Spartak Moscow.

In Scotland, Victor Wanyama headed Celtic in front in the 21st minute and teenage substitute Tony Watt rounded off another swift counterattack in the 83rd. All four-time champion Barcelona could muster was a stoppage time goal from three-time FIFA player of the year Lionel Messi.

Barcelona has nine points in Group G, Celtic is next with seven, Benfica has four and Spartak three.

Barcelona's only other loss this season was a 2-1 defeat to Real Madrid in the second leg of the Spanish Super Cup in August.

"It is not the first time we have lost a game like this and it won't be the last," Barcelona coach Tito Vilanova said.

In Portugal, Braga went ahead with a 49th-minute penalty from Alan and the score remained 1-0 when the game was suspended for about 10 minutes in the second half because of a floodlight failure.

When the lights came back on, it was all United. Robin van Persie equalized in the 80th, Wayne Rooney converted a penalty in the 84th and Javier Hernandez tapped in from short range in injury time.

United has an insurmountable 12 points in Group H. Cluj and Galatasaray are next with four each and Braga is last with three.

In London, Chelsea was outplayed for large periods and surrendered the lead twice, with Willian scoring both of Shakhtar's goals in the ninth and 47th minutes to enhance his burgeoning reputation.

Fernando Torres had scored Chelsea's opener in the sixth and Oscar had reclaimed the lead for the hosts in the 40th with a stunning 45-yard shot, with goalkeeper Andriy Pyatov to blame for both goals after botching attempted clearances.

Moses had the last laugh as Chelsea finished strongly, the substitute heading in Mata's cross with almost the last touch of the game.

Shakhtar and Chelsea each have seven points atop Group E, with the Ukrainian side ahead on goal difference. Juventus is a point behind and Nordsjaelland is last with one point.

Bouncing back from its first Serie A loss in two seasons at the weekend, Juventus got goals from Claudio Marchisio, Arturo Vidal, Sebastian Giovinco and substitute Fabio Quagliarella.

"Clearly we need to beat Chelsea and then battle it out with Shakhtar," said Juventus assistant Angelo Alessio, who is filling in on the touchline while head coach Antonio Conte serves a four-month ban for match-fixing.

In Germany, Claudio Pizarro scored a hat trick for Bayern, which also got goals from Bastain Schweinsteiger, Arjen Robben and Toni Kroos.

Valencia and Bayern have nine points each in Group F, with Valencia leading on goal difference. BATE is next with six points and Lille remained last with none.

"We want to win the group, it's important," Bayern's coach Jupp Heynckes said.