Michael Schumacher will make a shock return to Formula 1 to replace injured Ferrari driver Felipe Massa.
The seven-time world champion retired at the end of 2006 but will drive at the European Grand Prix on 23 August.
Ferrari said the 40-year-old will stand in for as long as Massa is sidelined by the serious head injuries he sustained in Hungarian Grand Prix qualifying.
"For team loyalty reasons I can't ignore this unfortunate situation," said the former Ferrari driver.
His spokesman Sabine Kehm had told the BBC on Tuesday that although Schumacher - who was working as a consultant for Ferrari - was not willing to make a full-time return to F1, he would not rule out standing in for Massa.
And the German racing legend has now decided to come out of retirement and make a sensational return to the sport.
"It is true that the Formula 1 chapter has long been closed for me," added Schumacher, who won five world titles for Ferrari.
"The most important thing first: thank God, all news concerning Felipe is positive and I wish him all the best again.
"This afternoon I met with team principal Stefano Domenicali and Ferrari president Luca di Montezemolo and together we decided that I will prepare myself to take the place of Felipe. "As the competitor I am, I also very much look forward to facing this challenge."
Schumacher has not driven an F1 car since April 2008 and competed in the last of his 249 grands prix in October 2006. And the most successful F1 driver of all time now has slightly more than three weeks to prepare himself for the European Grand Prix in Valencia.
The ban on in-season testing means Schumacher will not be able to turn a wheel of the 2009 specification Ferrari before first practice on Friday 21 August.
SCHUMACHER'S F1 RECORD
1991: Makes F1 debut for Jordan, switches to Benetton
1992: First Grand Prix win (Belgium), finishes third in the championship
1994: Wins first world title with Benetton, winning eight races
1995: Retains world title, winning nine races
1996: Joins Ferrari
1997: Finishes season second but is disqualified from championship
1999: Breaks leg at Silverstone when leading world championship
2000: Ends Ferrari's 21-year wait for a world title, winning nine races
2001: Retains world title, again winning nine races
2002: Quickest ever world title win, with 11 race wins
2003: Breaks Juan Manuel Fangio's record of five world titles
2004: Wins seventh and final world title
2006: Retires at the end of the season
2009: Announces comeback to fill in for injured Felipe Massa
Nevertheless, the team have chosen Schumacher - who won 91 grands prix in a glittering career - ahead of reserve drivers Marc Gene and Luca Badoer.
"Ferrari intends to entrust Michael Schumacher with Felipe Massa's car for as long as the Brazilian driver is not able to race," read a team statement.
"Michael Schumacher has shown his willingness and in the next few days he will undergo a specific programme of preparation at the end of which it will be possible to confirm his participation in the championship, starting with the European Grand Prix."
There are six more races to go after Valencia, including trips to Belgium, Italy, Singapore and Japan.
Schumacher will undergo an intensive training programme to determine whether he is fit enough to return to the rigours of F1 racing.
Since retiring from the sport, Schumacher has occasionally taken part in motorcycle events but in February he suffered neck and back injuries in a motorbike accident.
Those injuries could affect his ability to drive an F1 car, with huge pressures placed on the neck because of the varying G-forces.
Massa could be out for the rest of the season after undergoing surgery on a fractured skull sustained when a spring from Rubens Barrichello's Brawn hit him on the helmet when he was travelling at more than 160mph during qualifying in Hungary on Saturday.
The Brazilian is set to leave intensive care and is making progress, although there is also concern about damage to his left eye.
Schumacher is close to Massa, who was his team-mate in his final season, and has taken a close interest in the Brazilian's career.
BBC Radio 5 Live F1 commentator David Croft believes Schumacher is coming back partly because of that close relationship.
Schumacher will have huge impact - Jordan
"I think he's coming back because it is to replace Felipe Massa, temporarily. He is very close to Felipe, they've had a great relationship over the years," stated Croft.
"I think it's his way of doing something to help Felipe, and doing something to help Ferrari at the same time, because if you look at the alternatives Ferrari had, they weren't really alternatives.
"Who else is there who could come into Ferrari and hit the ground running, who knows the car, who knows the team, who could give them a podium?
"The European Grand Prix, which was not one we were looking forward to at the start of this year, has now got a real spice to it.
"Lewis Hamilton against Michael Schumacher for the first time ever? Jenson Button up against Michael Schumacher? How will Kimi Raikkonen respond? It's going to be fascinating."
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.