MANCHESTER, England (AP) — Cristiano Ronaldo fell to his knees at the final whistle and looked to the sky as Manchester United's fans sang his name.

The Portugal star had saved his team again in the Champions League.

The greatest scorer in the competition’s history soared to head in an 81st-minute winner as United erased a two-goal halftime deficit to beat Atalanta 3-2 in a wild match at Old Trafford on Wednesday.

"That's just what he does," United manager Ole Gunnar Solskjaer said.

Ronaldo’s record-extending 138th goal in the Champions League came three weeks after he scored in the fifth minute of stoppage time to snatch a victory over Villarreal in the second round of games.

This time, the goal came earlier — and was a trademark header with hang time and unerring accuracy after meeting a cross from Luke Shaw that was whipped in from deep on the left.

“His leap, his timing — it was the perfect header,” United captain Harry Maguire said. “He has come up with a massive goal again in the Champions League.”

United keeps doing it the hard way in this season's competition.

There was the surprising loss to Young Boys in the first game, after Aaron Wan-Bissaka's first-half red card. Then a come-from-behind 2-1 win against Villarreal after being outplayed for large parts at Old Trafford.

Now this comeback against Atalanta, which moved United into first place in Group F — two points above the Italian side and Villarreal.

Atalanta took a two-goal lead thanks to goals by Mario Pašalić — a tap-in in the 15th minute after United's defense was caught off guard by a quickly taken free kick — and Merih Demiral's header from a corner in the 29th.

United, which came into the game with just two wins from its last seven games in all competitions, was jeered off the field at halftime.

However, Solskjaer's team showed a different side in the second half, laying siege to Atalanta’s goal as Marcus Rashford — on his first start this season after injury — reduced the deficit in the 53rd with a calm finish following a delicious outside-of-the-foot pass behind the defense by Bruno Fernandes.

Maguire, who was partly at fault for Atalanta's goals, swept in the equalizer in the 75th after Fernandes' cross made its way past a number of players and to the back post where the England defender was lurking.

Ronaldo had the final say, not just through his goal — his sixth in eight games since returning for a second spell at United — but also through his last-ditch clearance in the final seconds that sparked a roar from the home fans.

Ronaldo was playing his 300th game for the club.

The win relieves some of the pressure on Solskjaer, who vowed to make changes to the team to restore some balance after a sobering 4-2 loss to Leicester on Saturday. He was true to his word, dropping Paul Pogba and pairing Scott McTominay and Fred to give more energy in central midfield.

Initially, it didn't work, with Atalanta still managing to pick off United in the first half.

The momentum of the game swung at halftime, with Atalanta looking less assured at the back after Demiral was forced off at the break because of injury.

The visitors were already without defenders Rafael Tolói — the captain — Berat Djimsiti, Robin Gosens and Hans Hateboer for the match, and United took advantage of Atalanta's makeshift backline in the second half.


More AP soccer: and