(CNN) -- Seven-time world champion Michael Schumacher is to return to Formula One next season to drive for Mercedes, the German carmaker announced on Wednesday.
The 40-year-old German, who retired in 2006, has agreed a three-year contract with the possibility for a further extension according to his agent Sabine Kehm and will be on the grid for the curtain-opening Bahrain Grand Prix on March 14.
Schumacher, who was unveiled at the team's factory in Brackley, will join compatriot Nico Rosberg at the former Brawn GP team, who were taken over by Mercedes at the end of last season having won the constructors' and drivers world championships.
"After a three-year break, I have all the energy again that I was lacking," Schumacher told reporters via a teleconference call.
Schumacher, who won five of his world titles with Ferrari, attempted to make a comeback for the Italian team last year in place of the injured Felipe Massa, but a neck injury sustained in a motorcycle race thwarted his return.
However, Schumacher moved to quell doubts over his current ability to race: "My neck is no longer a problem," he said.
"Over the summer it was too soon after the accident. Now everything has healed," said Schumacher, who will have his first practice session with his new team on February 1.
"I have decided to return to Formula One. Mercedes GP and I agreed on teaming up for the coming seasons. And to be honest, I'm already super excited by the prospect to be back in a F1 cockpit," he added on his official Web site.
"I don't want to deny at all that the idea of a German F1 team extremely tempts me. I guess every German driver would feel this way. And of course it plays a major role that I again can work together with Ross at Mercedes GP. Above all, however, my old hunger for racing is back -- I realized that my old passion was returning. Suddenly I was on fire again," he added.
The comeback is just the latest chapter in a remarkable career for the driver who currently holds the record for grand prix wins (91) and most world titles.
His return, just 11 days short of his 41st birthday, will easily make him the oldest driver on the grid and will leave Schumacher aiming to match the feats of former great Juan Manuel Fangio of Argentina, who was a world champion at the age of 46 in 1957.
Rumors have been circulating for several weeks that he would return instead with Mercedes, where he will be reunited with team chief Ross Brawn, who helped to him to his string of five titles at Ferrari.
Ferrari president Luca di Montezemolo told reporters at their Christmas lunch last week that Schumacher had revealed to him he was close to a return with Mercedes.
"I hadn't spoken to him since Abu Dhabi but I spoke to him on Wednesday," Di Montezemolo said. "He phoned me and he told me that there is a very, very, very strong possibility [of joining Mercedes] "
Schumacher, who has acted as a consultant with Ferrari since he retired, will be ending a 13-year association with the famous marquee, but with the returning Massa and new-signing Fernando Alonso in their line-up for 2009 that route to return was blocked.
His aborted 2009 comeback created worldwide interest and he said then that abandoning his plans was one of the most disappointing moments of his life.
But Schumacher has worked his way back to fitness and put on an impressive display in the Race of Champions exhibition in China in November to underline his readiness for a new comeback.
The confirmation of the world champion's return caps a good week for the fledgling Mercedes team, who announced a long-term sponsorship agreement with Malaysian national oil and gas company Petronas.
From 2010, the new "Silver Arrows" team will compete in the World Championship as the Mercedes Petronas Formula One Team according to statement on their official Web site.