Another knee injury resulted in him missing the entire 1997–98 season. He did return to action in the 1998–99 season and West Ham finished fifth to qualify for the UEFA Cup, but his injury problems failed to go away and he was restricted to just nine Premier League games. West Ham then terminated his contract and he retired from professional football after a 14-year career, 11 years of which had been spent at West Ham. In two spells at West Ham, he had played 315 competitive games and scored 64 goals, many of them penalties. His final appearance for the club came against Arsenal on 6 February 1999, with his final goal coming in the FA Cup against Swansea City on 2 January 1999.