Match ends, Bristol City 0, West Ham United 1.
- Bristol City beaten by late Sakho strike
- West Ham in fifth round for first time since 2011
- City striker Smith has two headers cleared off line
- League One side have not reached fifth round in 21 years
Diafra Sakho headed a late winner as West Ham withstood a frantic start from Bristol City to book their place in the FA Cup fifth round.
The League One side dominated the opening exchanges at a sell-out Ashton Gate and striker Matt Smith twice had headers cleared off the line.
But West Ham kept their composure and Sakho headed in Andy Carroll's tempting cross nine minutes from the end.
Sakho, who came on as a 56th minute substitute, also hit the crossbar.
Bristol City went into the contest in imperious form, on the back of four straight wins and with just one defeat in their last 12 outings.
Much of the Robins' success in League One this season has been built on a strong defence.
|Match of the Day 2 analyst Phil Neville|
|"Looking at the results and big teams going out if I was West Ham I'd be going hell for leather to win this.|
|"Two games from a Wembley semi then you look to the final. If I was West Ham I'd be going for it."|
They have conceded just 22 goals in 25 league games and sit joint-top alongside Swindon.
And Steve Cotterill's team began in confident fashion, with the pace of Luke Freeman and the height and physical presence of forward Smith causing the Hammers problems.
Twice Smith had headers cleared off the line, first by Mark Noble before Andy Carroll came to West Ham's rescue with a superb clearance after keeper Adrian was again beaten by Smith. Carroll had his arm raised but television replays showed he used his head to clear the ball.
The Hammers, who are seventh in the Premier League and unbeaten since the turn of the year, improved markedly after the break, especially after the introduction of Sakho and fellow substitute Morgan Amalfitano.
Sakho gave warning of what was to come when he clipped the crossbar with a strong shot.
His goal came courtesy of good work on the right by Carroll, who delivered an inviting cross which Sakho headed past Frank Fielding.
Smith had one last headed attempt for the home side, connecting with Jay Emmanuel-Thomas's stoppage-time cross but he put his effort wide of the post.
The Hammers had reached the fourth round courtesy of a 9-8 penalty shoot-out replay win over Everton and West Ham manager Sam Allardyce had made it clear to his players that he did not want to waste that hard work.
After a weekend of shocks, with Chelsea and Manchester City losing, West Ham avoided going the same way.
West Ham boss Sam Allardyce: "I knew it was going to be tough and it was exactly that. Bristol City showed why they are where they are in their league.
"We found it difficult to get our passing game going but thankfully Andy's cross and Sakho's header was all we needed to get a very important win.
"This is a pretty big result for us."
Bristol City boss Steve Cotterill: "We've played like that for most of the season but we had to score in that first half hour because our tempo was so good.
"I was surprised at how many times we got a look at their goal. But overall I am very proud of the lads."
- 2LittleSubstituted forWagstaffat 75'minutes
- 12SavilleSubstituted forPackat 83'minutes
- 15FreemanSubstituted forAgardat 82'minutes
- 30SongSubstituted forAmalfitanoat 57'minutes
- 16NobleBooked at 80mins
- 4NolanBooked at 78minsSubstituted forDemelat 88'minutes
- 31E ValenciaSubstituted forSakhoat 57'minutes
- Lee Mason
- Shots on Target
Second Half ends, Bristol City 0, West Ham United 1.
Attempt missed. Matt Smith (Bristol City) header from the centre of the box is close, but misses to the left. Assisted by Jay Emmanuel-Thomas with a cross.
Foul by Diafra Sakho (West Ham United).
Marlon Pack (Bristol City) wins a free kick in the defensive half.
Aaron Cresswell (West Ham United) wins a free kick in the defensive half.
Foul by Scott Wagstaff (Bristol City).
Attempt saved. Matt Smith (Bristol City) header from the centre of the box is saved in the bottom left corner. Assisted by Joe Bryan with a cross.
Substitution, West Ham United. Guy Demel replaces Kevin Nolan.
Offside, West Ham United. Adrián tries a through ball, but Andy Carroll is caught offside.
James Tomkins (West Ham United) wins a free kick in the defensive half.
Foul by Matt Smith (Bristol City).
Attempt missed. Joe Bryan (Bristol City) right footed shot from outside the box misses to the right. Assisted by Kieran Agard.
Substitution, Bristol City. Marlon Pack replaces George Saville.
Substitution, Bristol City. Kieran Agard replaces Luke Freeman.
Goal! Bristol City 0, West Ham United 1. Diafra Sakho (West Ham United) header from the left side of the six yard box to the top left corner. Assisted by Andy Carroll with a cross.
Mark Noble (West Ham United) is shown the yellow card.
Attempt saved. Morgan Amalfitano (West Ham United) right footed shot from outside the box is saved in the top right corner.
Attempt missed. Luke Ayling (Bristol City) header from the right side of the six yard box is too high. Assisted by Joe Bryan with a cross.
Kevin Nolan (West Ham United) is shown the yellow card for a bad foul.