SILVERSTONE, England — In a surprise announcement ahead of the British Grand Prix, Red Bull driver Mark Webber said Thursday he is leaving Formula One after this season to race Porsche sports cars.

The 36-year-old Australian said he signed a contract with the German company "that extends over several years" and that he will compete in the Le Mans 24 Hours and World Endurance Championship next year.

"I'm very much looking forward to this new challenge after my time in Formula 1," Webber said in a statement. "Porsche will undoubtedly set itself very high goals. I can hardly wait to pilot one of the fastest sports cars in the world."

Webber has struggled this season, failing to win a race and is currently fifth in the drivers' championship, 63 points behind teammate Sebastian Vettel.

Webber first raised doubts about his future with Red Bull after Vettel ignored team orders and overtook him for victory at the Malaysian Grand Prix.

Red Bull confirmed that Webber is leaving but has yet to say who might replace him. Among the favorites would be Lotus Driver Kimi Raikkonen, who is good friends with Vettel.

"I am sure Mark thought long and hard before making what has no doubt been a very difficult decision," Red Bull Principal Christian Horner said. "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.

"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."

Since joining F1 in 2002, Webber had won nice races and had 36 podium places during a career that also included stints with Williams and Minardi. He has already raced at Le Mans twice.