London - France international Dimitri Payet's long drawn out transfer saga ended on Sunday as Premier League side West Ham agreed to sell him to Ligue 1 outfit Marseille for a reported 25 million (€29.3m, $31.3m).
The 29-year-old - who starred for the Hammers last season scoring 12 goals - had effectively gone on strike at the beginning of the month.
He said he would not play for the club again and his and his wife's priority was a return to France and his former club.
Having turned down two earlier bids - reported to be 19m and 20m - West Ham changed their tune with the higher offer and also having signed Scotland international Robert Snodgrass from Hull.
"West Ham United can confirm that a 25m fee has today been agreed for the transfer of Dimitri Payet to Olympique de Marseille," tweeted the club on their Twitter page.
West Ham co-chairman David Sullivan expressed his disappointment at Payet and said the club would like to have made an example of him.
"The Club would like to place on record its sincere disappointment that Dimitri Payet did not show the same commitment and respect to West Ham United that the Club and fans showed him," Sullivan said in a statement.
"To be frank, my Board and I would have preferred for him to have stayed in order to make an example of him, as no player is bigger than the club."
Payet joined West Ham from Marseille for 10 million in 2015 and only last February signed a new 125,000 a week five-and-a-half-year contract.
Payet stunned West Ham boss Slaven Bilic earlier this month when he admitted he wanted to leave during the January transfer window and refused to play in their match against Crystal Palace.
"We're going home," Payet tweeted alongside a photo of a small private plane with its door open.
Payet, who also starred for France in last year's Euro 2016 championships where they lost to Portugal in the final, had been demoted to train with the Under-23 side as he was frozen out by Bilic and his team-mates after his refusal to play.
He was erased from their WhatsApp team conversations and excluded from team dinners and had also attracted the ire of the fans.
His photograph outside the ground had to be guarded by a steward at home matches and the fans normal laudatory chant of him was replaced by more abusive terms.
On rentre à la maison pic.twitter.com/AcwO3FChYt— Dimitri Payet (@dimpayet17) January 29, 2017