On 23 July 2007, after nine years at Arsenal, Ljungberg joined London rivals West Ham United on a four-year contract. Ljungberg made his West Ham debut on the opening day of the 2007–08 season, in West Ham's 2–0 home defeat by Manchester City on 11 August, a game in which he was also captain. After seven months at the club, Ljungberg finally scored his first goal for West Ham in the home match against Birmingham City on 9 February 2008, putting West Ham up 1–0, with the game finishing 1–1. Ljungberg also scored what turned out to be his final goal for the club in a 2–1 defeat away at Sunderland a month later.