Double Formula 1 world champion Fernando Alonso will return to the sport next year with Renault.
The Spaniard, 39 later this month, left F1 at the end of 2018 but always kept the door open for a potential comeback.
He will be returning with the team for whom he won his two titles in 2005-6.
"It's an extremely happy day for me coming back to F1 first but also to the team with which I had the best experience in the category," Alonso said.
Renault's progress back to the front stalled last year, when they slipped from fourth to fifth in the constructors' championship.
But Alonso said he believed that new rules, originally intended for 2021 but which have been delayed until 2022 as a result of the coronavirus crisis, gave the team the chance to return to competitiveness.
"Probably my first intention was to go out in 2018 and see how life was outside the bubble and have a think for the 2021 rules," Alonso said.
"This has been postponed one year because of Covid but still it's worth being in the sport in 2021 as a preparation for me after two years not driving these cars, and to build up with the team and have a good season.
"I know only one team will be winning in 2020 - and in 2021 probably - but I think the 2022 rules will hopefully bring some fairness to the sport and some close action with teams more level and less scope to invent something that has a large performance advantage.
"There is time to build on those projects. I am relaxed, I am aware of what 2021 will be and I'm hopeful for 2022."
Renault F1 team principal and managing director Cyril Abiteboul said: "His presence in our team is a formidable asset on the sporting level but also for the brand to which he is very attached.
"His experience and determination will enable us to get the best out of each other to take the team towards the excellence that modern F1 demands.
"He will also bring to our team, which has grown very fast, a culture of racing and winning."
Alonso has signed for at least two years and there are options for him to continue beyond that.
He will partner the Frenchman Esteban Ocon, as a replacement for Daniel Ricciardo, who is moving to McLaren.
Can Alonso win at 40?
In addition to his two world titles, Alonso is the sixth most successful driver in F1 history in terms of wins with 32, and is regarded as one of the greatest racing drivers in the history of the sport.
He will turn 40 midway through his first season back but he said he did not believe age would be a barrier.
"The stopwatch is the only thing that matters, not the age," Alonso said.
"I feel ready and I feel I'm at 100% in terms of driving.
"I did a couple of fitness tests 15 days a go and I had the best results in my career and I am motivated, happy and stronger than ever."
Alonso has kept himself busy since he left F1 at the end of 2018.
He has become a two-time winner of the Le Mans 24 Hours, adding victory in 2019 to his first win in 2018, won the world endurance championship and also competed in this year's Dakar Rally.
He has set himself the target of winning motorsport's so-called triple crown, for which he needs to add only the Indy 500 to the Monaco Grand Prix and Le Mans victories he has already achieved.
Alonso starred on his debut at Indy in 2017, driving a McLaren-branded car run by Andretti Autosport.
But a second attempt last year with a newly established McLaren team ended in embarrassment after he failed to qualify because of what the team admitted were a series of organisational failures.
He is returning to America's biggest race this year with McLaren, on his delayed date in August.
He said he was "100% committed" to Indianapolis and would "start the serious job" with Renault in September.
- Disability and Me: Alex Brooker explores what it really means to be disabled in the UK
- Andy Murray's Greatest Hits: Olympic gold, Grand Slam glory and Davis Cup heroics