Daniel Ricciardo will leave McLaren at the end of the 2022 Formula One season by mutual agreement and one year before the Australian's contract was due to expire, both parties announced on Wednesday.
Ricciardo joined McLaren from Renault at the end of 2020 but, despite winning last year's Italian Grand Prix at Monza in a one-two finish, has struggled to match British team mate Lando Norris's performance.
Ricciardo is expected to be replaced by compatriot Oscar Piastri, reserve driver for Renault-owned Alpine who this month triggered a contract dispute after rejecting an offer to race for them next year.
McLaren would not comment on Ricciardo's replacement and gave no details of the financial cost of terminating the contract.
‘Bittersweet’: Ricciardo
Sharing the news with his 7.3 million followers on Instagram, Ricciardo said the development was "bittersweet, for sure".
"We put in a lot of effort on both sides but it just hasn't worked the way we wanted, so the team's decided to make a change for next year," said the 33-year-old.
"We had a lot of discussions but in the end we mutually agreed it was the right thing for both of us.
"I will continue to do the rest of this year, absolutely, and continue to give it my all... What lies ahead, I'm not sure yet but we'll see."
Alpine have a vacancy, if they must give up on Piastri, with double world champion Fernando Alonso heading to Aston Martin at the end of the year.
Other teams also have drivers out of contract at the end of the year.
Ricciardo said he would look back with a smile and had learned things at McLaren that would help him for the next step in his career and life in general.
"From a results point of view, to consistently get the results in that form that I was after, it wasn't always there and made some weekends tough. I felt those absolutely. But I also have many happy memories of my time at the team," he said.