The 32-year-old Mali international was released by Fulham at the end of the 2012-13 season and has not played a professional game since December 2012 due to a longstanding knee problem.

However, he has been given a contract until the end of the current campaign after proving his fitness and will be paid depending on the number of first-team appearances he makes.

"The club is delighted to announce that Mahamadou Diarra has rejoined Fulham on a deal that will run until the end of the 2013-14 season," read a statement on the Fulham website.

A powerful holding midfielder, Diarra won four Ligue 1 titles with Lyon during a four-year spell in which he formed a formidable partnership with future Chelsea midfielder Michael Essien.

He moved to Madrid in a deal reportedly worth �22 million ($36.4 million, 26.4 million euros) in 2006 and went on to win two Liga crowns and the 2011 Copa del Rey with the Spanish giants.

He subsequently had a brief spell at Monaco, before joining Fulham on a free transfer in February 2012.

Fulham are currently rooted to the foot of the table in the Premier League, four points adrift of safety with seven games of the season remaining.