Felix Magath's side currently sit bottom of the table and the Mali international will now attempt to help the Whites maintain their top-flight status.
Diarra, 32, was released last summer following a long-term knee injury but Fulham announced on Wednesday that he has now rejoined the west London side.
"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," a statement read on Fulham's official website.
"The 32-year-old was out of action for a sustained period after struggling with a knee injury, but worked relentlessly to regain full fitness.
"Diarra's short-term contract with Fulham will see his remuneration based on the number of appearances he makes for the first team.
"The former Real Madrid midfielder initially joined the Whites on a free transfer in February 2012 and he went on to make 19 appearances for the club, scoring once."
With just seven games remaining, Fulham are four points from safety and face Champions League-chasing Everton at Craven Cottage on Sunday before taking on Aston Villa and Norwich.
Source : PA