Seven-time world champion Michael Schumacher will retire from Formula One at the end of the season.
Schumacher is the most successful F1 driver in history
The German made the announcement after winning the Italian Grand Prix to reduce title rival Fernando Alonso's lead to just two points.
The Ferrari star's victory was the 90th in a career in which Schumacher has broken almost every F1 record.
He will be remembered as one of the greatest, and most controversial, drivers in the history of the sport.
"I have decided that I am going to retire from racing. It has been an exceptional time," the 37-year-old said.
"What motorsport has given to me in more than 30 years, I have loved every moment of it, good and bad.
I cannot see I have the energy and motivation for further years
"Words are not enough and whatever I say now will never fully express how much I love this fascinating world of motor sport and all it has given me. I am profoundly grateful for everything I have had.
"It has been a tough decision to not work at this level. The day has come and I felt this is the moment.
"It has naturally been difficult, but all the effort, energy and motivation you need in order to be competitive, I cannot see I have that for further years."
Schumacher, who will be replaced at Ferrari by Finn Kimi Raikkonen, has dominated the sport since the death of Ayrton Senna in 1994.
That was the year in which Schumacher won his first world title, with Benetton-Ford, and he added a further championship with the team in 1995, this time with a Renault engine, before moving to Ferrari.
We have lived through some unforgettable times together, some good, some bad, achieving results that will be hard to equal
Luca di Montezemolo
His ambition was to return to the top a team whose results did not live up to its image and history.
He ended Ferrari's 21-year drought with his third title in 2000, and went on to win another four in a row.
Schumacher added: "As well as timing the decision, I thought it was fair so Felipe [Massa, his Ferrari team-mate] has a chance to decide his future.
"He has done a great job, he is good team-mate and he had to decide.
"I was pleased that my future replacement was [Raikkonen] and now would like to concentrate on these last three races and finish it in style.
SCHUMACHER'S F1 CAREER
1991 Makes debut for Jordan in Belgium; switched to Benetton for next race
1992 Wins first race in Belgium
1994 First world title, driving a Benetton-Ford
1995: Wins second title in Benetton-Renault
1996: Moves to Ferrari, wins three races
1997: Stripped of second in championship for driving into title rival Jacques Villeneuve
1999: Breaks leg at Silverstone
2000: Wins first of five consecutive titles with Ferrari
2003: Wins sixth title to break Juan Manuel Fangio's record of five
"We have done a big step to the championship today and I look forward to that now."
The records Schumacher has set will probably never be broken, and he also established a new standard for F1 drivers with his extreme fitness and commitment.
But his legacy will also be that of a driver who stretched the rules to their limit and sometimes beyond in his quest for success.
Controversy followed him throughout his career, and he was involved in a series of incidents that left many observers questioning his sense of fair play.
Ferrari president Luca di Montezemolo said: "Now that decision has been taken, I feel a sense of sadness.
"We have lived through some unforgettable times together, some good, some bad, achieving results that will be hard to equal.
"To Michael goes the thanks of everyone in the company and the supporters of Ferrari for all the dedication he has shown to our colours, for the determination and the courage with which he has worked which has provided immense satisfaction.
"His relationship with Maranello will continue, albeit in a different form and I am very happy about that."