Alou Diarra spent three years at Liverpool and did not play a first-team game

West Ham have completed the signing of French midfielder Alou Diarra from Marseille for a fee reported to be £2m.

Diarra, 31, signed a three-year deal at Upton Park on Friday after completing his transfer from the French side.

The midfielder, who spent three years at Liverpool but did not make a first-team appearance, played all four of France's games at Euro 2012.

Diarra said: "I am excited to be here at this club and to be playing for them in the Premier League."

He added: "I know a lot about West Ham as a club. When I knew they were interested in signing me, I was very happy and knew it would be a good choice for me.

"We are a Premier League club and I know of players who were here before like Paolo Di Canio and Scott Parker, but of the players now in the team, I know Guy [Demel], Mo [Diame] and of course, Modibo Maiga, who played in the French league last year."

Diarra, with 44 international caps, has played the majority of his career in France. But his Marseille future was placed in doubt when he reported back from Euro 2012 six days late, an infraction for which he was fined.

West Ham have already paid Aston Villa £2.5m for James Collins this summer and brought in Mali striker Maiga, who completed a £4.7m transfer from French club Sochaux last month,- as Sam Allardyce rebuilds his promotion-winning squad.