Premier League West Ham edged out League One Lincoln City to reach the fourth round of the Carabao Cup.
The Hammers broke the deadlock in the 70th minute, when Tomas Soucek made a late run into the box to get on the end of Said Benrahma's corner.
Lincoln were made to rue the numerous chances they squandered in the first half - and Alex Mitchell had a close-range effort ruled out for offside after West Ham failed to deal with a long throw.
Reeco Hackett-Fairchild had Lincoln's best chance from Alistair Smith's cross, but he was denied by Hammers goalkeeper Lukasz Fabianski.