(CNN) -- Sergio Perez is to leave Formula One team McLaren at the end of the 2013 season after just one year with the British marque.
The 23-year-old, known in his home nation of Mexico as "Checo", is one of the country's biggest sporting stars, but has struggled after his high-profile move to one of the sport's biggest outfits prior to the start of this campaign.
Perez, McLaren stablemate of 2009 Formula One world champion Jenson Button, has yet to record a podium finish this season and is 12th in the standings on 35 points -- 312 behind leader Sebastien Vettel, of Red Bull.
Speculation has been rife in recent weeks that Perez was set to leave the team, with McLaren young driver Kevin Magnussen tipped to replace him.
Now Perez has confirmed via a statement on his official Twitter page that he is to leave McLaren but insists he will give his all in the final two races of the season.
"First of all, I would like to thank McLaren for giving me the opportunity to be with them this season," he Perez.
"It has been an honor for me to have been in one of the most competitive teams in the sport and I do not regret even a bit having joined them.
"I have always given the best of me for the team and still despite this I could not achieve what I aimed for in this historic team."
Perez has just two races left, starting with the United States Grand Prix in Austin this weekend in which he is likely to be supported by a huge Mexican contingent, the circuit in Texas lying just 200 miles from the border.
"I am committed to delivering very good results in these last two races, especially in Austin," he said. "I am so much looking forward to see all my people gathered together, feel their energy and show them the best of me.
"I would like to say to every single one of my fans around the world and in my country that I am eternally grateful to them. They have never let me down, especially in difficult moments like these.
"I truly appreciate their support, they have never forgotten me. I have met a lot of new people at McLaren and I have made many good friends as well. I am eternally grateful to them. It has been a learning experience to me."
McLaren has struggled to keep pace with Red Bull, Sebastian Vettel securing his fourth straight drivers' championship crown at the Indian Grand Prix last month.
They last won the drivers' title in 2008 when Lewis Hamilton triumphed, though the Briton now drives for Mercedes, and last took the constructors' crown in 1998.
McLaren's official Twitter account linked to a story in which team principal Martin Whitmarsh was quoted as saying: "First of all, we would like to thank Checo for his kind and gracious statement, and for being a fine team member during the 2013 Formula 1 season.
"There are still two grands prix yet to run this year, and our collective focus is on scoring as many points as we can in those two remaining races.
"Checo has made many friends during his time at McLaren -- and, together, as a team, we intend to do our utmost to help him finish his year with us with two good results, especially here in Austin, where he has so many fans.
"We wish him well for the future, and are sure that he will have many successes ahead of him.
"As regards our driver line-up for next year, no 2014 deal has yet been signed with any driver except Jenson, and we therefore have nothing further to announce at this time. As and when that situation progresses, we will make a further announcement accordingly."