Former Real man Diarra training with West Ham
Diarra, who was released by Russian side Lokomotiv Moscow in acrimonious circumstances last August, last played in England with Portsmouth and also had spells with Chelsea and Arsenal.
And a return to the Premier League could be on the cards, West Ham manager Sam Allardyce has revealed.
"I'm not sure what the state of negotiations are but he has been training with us recently," explained Allardyce.
"As soon as he is fit and ready he'll be a great addition to our squad.
"We're not in any rush but he would be a good addition if and when it happens."
Allardyce has been holding his own contract talks recently, as his deal at Upton Park runs out at the end of the season.
"There's still a way to go, but we'll talk when the time is right," he added.
"There's a lot of work to be done here and the potential of the squad is very exciting.
"The way the club is going with the new stadium round the corner it is an exciting time."