Mark Webber will leave champions Red Bull and Formula One at the end of the season to join Porsche's new Le Mans sportscar programme, the Australian driver announced on Thursday.
"I'm very much looking forward to this new challenge after my time in Formula One. I can hardly wait to pilot one of the fastest sports cars in the world," he said on his website.
Porsche said he had signed a multi-year contract. Red Bull said a decision on his replacement would not be made until later in the season.
The oldest driver on the starting grid, who will be 38 next year and is in his 12th season, Webber has yet to win a race in 2013 but has a good chance to rectify that at this weekend's British Grand Prix.
The straight-talking Australian - who drives a Porsche for private use - has won two of the last three races at Silverstone, including last year's, and has finished on the podium at what amounts to a home race every year since 2009.
He has won nine grands prix, all for Red Bull, since his debut with Minardi in 2002 but has been eclipsed in the championship by German team mate Sebastian Vettel who is chasing a fourth successive title.
Lotus driver Kimi Raikkonen, the 2007 world champion with Ferrari, has been strongly tipped to take Webber's place.
That move would replace one of the sport's most outspoken drivers with the most taciturn and, at 33, second oldest after Webber.
In a separate statement, Red Bull thanked Webber for his extensive contribution in his seven years with the team and their three successive constructors' crowns.
"I am sure Mark thought long and hard before making what has no doubt been a very difficult decision," said principal Christian Horner, who co-owns a GP3 team with Webber and is close to the Australian.
"His achievements in Formula One are extensive and I am sure he will continue to push hard and build on that record until the end of the season," added the Briton.
"We support Mark's decision, he has been an excellent addition to the team since joining us in 2007 and we wish him all the best in the next stages of his career."
Webber has renewed his Red Bull contract on a year-by-year basis for some time and his decision to call it a day came as no surprise.
Speculation that this would be his last season moved up a notch or two after the Malaysian Grand Prix, when Vettel disregarded 'team orders' to stay behind Webber and finish in one-two formation.
That 'betrayal' led to an even frostier relationship – or lack of one - between the two Red Bull drivers who have kept matters strictly professional for some time.
Webber has long complained that Vettel, still only 25, is the Austrian-owned team's favourite and that position will only be enhanced for the remaining 12 races now that he has decided to leave.
The Australian had hoped to become his country's first champion since Alan Jones in 1980 but the closest he came was 2010 when he went into the final race in Abu Dhabi second overall and eight points behind Ferrari's Fernando Alonso.
Vettel, who had been a further seven points adrift of Webber and had not led the championship all year, won that race and snatched his first title as the strategy unravelled in nightmare fashion for the Australian and Alonso.
Webber ended up third overall, repeating the feat in 2011.
At Minardi, Jaguar and Williams he did his best in largely uncompetitive cars, beating a string of team mates including Nico Rosberg - now a winner with Mercedes.
Webber has twice raced at Le Mans, with not entirely fond memories. With Mercedes in 1999 his car flipped into the air twice in practice and the warm-up before the team withdrew for safety reasons.
"I'm very pleased to have secured Mark Webber for our LMP1 (Le Mans prototype) project as one of the best and most successful Formula One pilots of our time," Porsche board member for research and development Wolfgang Hatz said in a statement.
"Mark is without doubt one of the world's best race drivers, he has experience at the Le Mans 24 hour race and on top of that he's been a Porsche enthusiast for many years."
Webber will compete in the world endurance championship with Switzerland's Neel Jani, Timo Bernhard and Romain Dumas also confirmed in the Porsche line-up.