Last updated on .From the section FA Cup

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.

Diafra Sakho's header was his 10th goal of the season

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."

Bristol City reached the FA Cup final in 1909, where they lost to Manchester United

West Ham required a replay and a marathon penalty shoot-out to get past Everton in the third round

The only previous FA Cup meeting between the sides was in the third round in 1969, when West Ham won 3-2 at Upton Park

Steve Cotterill was appointed manager of Bristol City in December 2013