LONDON — Free agent Jack Wilshere ended his long stay at Arsenal by moving to London rival West Ham on Monday.

The 26-year-old England midfielder signed a three-year contract with West Ham, the club said.

Wilshere, who has 34 senior caps and two goals, was unable to win a place in England's World Cup squad.

He spent his entire career with Arsenal, apart from loan spells at Bournemouth and Bolton, after joining the Premier League club's youth system as a nine-year-old. Wilshere's contract expired last month.