Updated

Manchester United avoided a humiliating home defeat in Champions League play on Tuesday as a pair of headers from Javier Hernandez helped the Red Devils earn a 3-2 victory over Braga.

Sir Alex Ferguson's side has made a habit of conceding early goals in league play this season, and Tuesday's European clash was no different as Braga's Alan scored twice inside the opening 20 minutes.

The visitors went in front when Alan caught the back side of United's defense napping. The Brazilian striker drifted in at the back post and nodded home a cross to give Braga a shock lead in the second minute of play.

Alan doubled the advantage at the 20-minute mark when he arrived at the penalty spot to turn in a low cross from the endline.

United pulled one back five minutes later when Shinji Kagawa's chip to the back post was nodded just inside the post by Chicharito.

The home side equalized in fortuitous fashion when a corner kick fell kindly in the penalty area and Jonny Evans was first to react, sweeping the loose ball into the back of the net from close range.

But the role of the hero was reserved for Chicharito, who made the most of a rare start by completing his brace with a header off of a brilliant cross from Tom Cleverley 15 minutes from time.

The win lifts Manchester United to a comfortable atop Group H as the club has taken maximum points from its three European games.

Braga sits third in the group on three points, one point shy of second-place Cluj after the Romanian side played to a 1-1 draw with Galatasaray on Tuesday.

In Group G, Barcelona overturned a one-goal deficit in dramatic fashion as a stoppage-time goal from Jordi Alba handed the Catalans a 2-1 win over Celtic, and an own goal from Jardel gifted Spartak Moscow a 2-1 win over Benfica.

Barcelona sets the pace in the group with nine points, followed by Celtic on four points, Spartak Moscow on three points and Benfica on one point.

In Group F, Roberto Soldado bagged a hat trick to lift Valencia to a 3-0 defeat of BATE and Thomas Muller converted a penalty kick to power Bayern Munich to a 1-0 win at Lille.

Bayern, BATE and Valencia are tied on six points apiece while Lille continues its pursuit of its first point.

And in Group E, Chelsea suffered its first Champions League loss under manager Roberto Di Matteo as the Blues fell 2-1 at Shakhtar Donetsk, and Juventus needed an 81st-minute equalizer from Mirko Vucinic to salvage a point in a 1-1 draw with FC Nordsjaelland.

Shakhtar moves into first place in the group with seven points and Chelsea drops to second with four points, while Juventus and Nordsjaelland remain third and fourth, respectively.