Lewis Hamilton said his "childhood dream" to race for Ferrari fuelled his bombshell decision to agree to join the team next year.
Hamilton, a seven-time Formula One world champion, will leave Mercedes at the end of the 2024 season in a stunning switch to Ferrari.
The 39-year-old had signed a new two-year deal with Mercedes worth £100 million (R2.3 billion) in August.
But Hamilton this week activated a break clause to seal his move to the Italian team after admitting the prospect of "driving in Ferrari red" was too hard to turn down.
"It's been a crazy few days which have been filled with a whole range of emotions," Hamilton said in a statement posted on his social media channels.
"But as you all now know, after an incredible 11 years at Mercedes-AMG PETRONAS F1 Team, the time has come for me to start a new chapter in my life and I will be joining Scuderia Ferrari in 2025.
"I feel incredibly fortunate, after achieving things with Mercedes that I could only have dreamed of as a kid, that I now have the chance to fulfil another childhood dream. Driving in Ferrari red.
"Mercedes has been a huge part of my life since I was 13 years old, so this decision has been the hardest I've ever had to make."
'Leap of faith'
Hamilton won six of his world titles during a seven-year period between 2014 and 2020.
But the British driver has struggled to match Red Bull rival Max Verstappen since he missed out on what would have been a record world championship in 2021 in controversial fashion.
Mercedes team principal Toto Wolff insisted on Friday he had no concerns over Hamilton's integrity ahead of his final season.
And Hamilton made clear his respect for Wolff and the Mercedes organisation as he said: "I'm incredibly proud of all that we've achieved together and I'm very grateful for the hard work and dedication of everyone I have worked with over the years and of course Toto, for his friendship, guidance and leadership.
"Together we have won titles, broken records and become the most successful Driver-Team partnership in F1 history.
"But the time is right to make a change and take on a new challenge. I still remember the feeling of taking a leap of faith into the unknown when I first joined Mercedes in 2013.
"I know some people didn't understand it at the time but I was right to make the move then and it's the feeling I have again now. I'm excited to see what I can bring to this new opportunity and what we can do together."
Pledging to bow out on a high note with Mercedes, Hamilton added: "I am more driven than ever, I am fitter and more focused than ever and I want to help Mercedes win once again.
"I am 100 percent committed to the job I need to do and determined to end my partnership with the team on a high."