Marseille have signed on-loan Manchester United goalkeeper Fabien Barthez in a two-year deal.
The 32-year-old joined the French side in January after losing his place towards the end of last season.
Manchester United have already settled a £5m package to terminate Barthez's contract from 30 June.
Barthez, who had his first spell at Marseille between 1992 and 1995, had already made it clear that he wanted to end his career at the Stade Velodrome.
Barthez joined United from Monaco for £7.8m in 2000 and had signed a contract with the club until June 2006 - the date he has now agreed with Marseille.