Cristiano Ronaldo says he is "back where I belong" at Manchester United and has dedicated his return to the club to former boss Sir Alex Ferguson.
United have paid an initial 15m euros (£12.85m) to sign the 36-year-old from Juventus, a decade after he left the club to join Real Madrid.
He has signed a two-year contract, with the option to extend for another year.
"Everyone who knows me, knows about my never ending love for Manchester United," he wrote on Instagram.
"The years I spent in this club were absolutely amazing and the path we've made together is written in gold letters in the history of this great and amazing institution."I can't even start to explain my feelings right now, as I see my return to Old Trafford announced worldwide.
"It's like a dream come true, after all the times that I went back to play against Manchester United, and even as an opponent, to have always felt such love and respect from the supporters in the stands.
"This is absolutely 100% the stuff that dreams are made of!"
Five-time Ballon d'Or winner Ronaldo signed off: "I'm right here! I'm back where I belong! Let's make it happen once again! PS - Sir Alex, this one is for you…"
Sir Alex Ferguson was United manager during Ronaldo's first spell at Old Trafford, when he scored 118 goals in 292 appearances before leaving for Real Madrid in 2009.
He is believed to have spoken to Ferguson prior to his return to United, which could also cost the club a possible 8m euros (£6.85m) in add-ons.
Current Red Devils boss Ole Gunnar Solskjaer said: "You run out of words to describe Cristiano. He is not only a marvellous player, but also a great human being.
"To have the desire and the ability to play at the top level for such a long period requires a very special person.
"I have no doubt that he will continue to impress us all and his experience will be so vital for the younger players in the squad.
"Ronaldo's return demonstrates the unique appeal of this club and I am absolutely delighted he is coming home to where it all started."
Ronaldo had been linked with Manchester City but opted to return to United, where he spent six years and won three Premier League titles, one Champions League, two League Cups and one FA Cup - as well as the Fifa Club World Cup and Community Shield.
Ronaldo could be available to Solskjaer for United's home game against Newcastle United on 11 September, which is the club's first match following the international break.
Ronaldo wore the number seven shirt in his first stint at United but that is currently held by Edinson Cavani and, even if the Uruguay striker was willing to hand over the shirt number, Premier League rules prevent a mid-season swap except in the most extreme circumstances.
How did this move come about?
On 17 August, Ronaldo, who had been linked with Real Madrid, Paris St-Germain and Manchester City during the summer, criticised media reports linking him with a move away from Juventus.
Real boss Carlo Ancelotti said he had "never considered signing" the forward, while Juventus manager Massimiliano Allegri said the player had "never expressed a desire to leave" and was "staying" with the Serie A side.
Allegri then left Ronaldo out of his starting line-up and brought him on as a substitute for his side's league opener against Udinese before Juventus told the player they were willing to sell him.
Ronaldo's agent Jorge Mendes spoke to several major European clubs about potentially signing him, including Manchester City and Paris St-Germain.
On Friday, Allegri revealed Ronaldo had told Juventus that he "no longer has any intention" to play for the club, while United boss Solskjaer said his former Old Trafford team-mate "knows that we're here".
City boss Pep Guardiola stated players like Ronaldo "decide where they are going to play" before the Premier League champions, having considering the matter carefully, decided not to pursue a deal for him.
In a dramatic transfer saga, United later announced they had reached an agreement to sign Ronaldo subject to personal terms, a visa and a medical.
In a statement confirming his exit, Juventus described how "two icons of the European and football world came together" in 2018, but that after 101 goals in 133 games and five trophies, the "chapter has come to an end".
"The Juventus fans welcomed CR7 like a king, eager to see him on the pitch and cheer with him," the club added. "It was a great story."
The Italian club said they would receive the money for Ronaldo over five years - until he is 41.
In numbers: Why Ronaldo is one the world's best
A five-time Ballon d'Or winner, claiming the coveted prize in 2008 (with Man Utd) and 2013, 2014, 2016 and 2017 (all with Real Madrid).
A five-time Champions League winner in 2008 (with Man Utd), and 2014, 2016, 2017 and 2018 (all with Real Madrid).
Won seven league titles in three major leagues in 2007, 2008, 2009 (all with Man Utd), 2012 and 2017 (with Real Madrid) and 2019, 2020 (with Juventus).
A European Championship winner with Portugal in 2016.
Winner of 32 trophies for club and country with Sporting Lisbon, Manchester United, Real Madrid, Juventus and Portugal.
All-time Champions League leading scorer with 134 goals in 176 appearances.
Find all the latest football transfers on our dedicated page.