The former France international, now 30, started his career with Nantes, but his potential earned him a move to Chelsea in 2005 at the age of 20, where he was billed as the "new makelele".
The Paris native made only 13 Premier League appearances for the Blues, and even fewer for his next club Arsenal, before finding his feet with Portsmouth, whom he joined in 2008.
Diarra's next move was to Russia when he signed for Anzhi Makhachkala in 2012 and then Lokomotiv Moscow in 2013, where a falling out with the coach left him out of action for the past year.
But now OM have snapped him up on a free transfer and look set to hand the itinerant Frenchman his Ligue 1 debut.
"I'm back in France. I haven't played for a little while, but now my problems are all sorted out. I'm very happy to be here at OM and I hope everything goes well," he told his new club's website.
"For me it's more about returning to France, to my homeland. I think there are some great things to achieve here. I'll be making my Ligue 1 debut at 30… better late than never!"