Substitute Shaun Maloney slotted home a second-half equaliser as Sky Bet Championship leaders Hull were made to fight all the way for a 1-1 draw by Bristol City at Ashton Gate.
While the visitors showed the greater quality, their hosts left the pitch to a rousing ovation having battled from first whistle to last.
Kieran Agard fired the Robins in front after 39 minutes after Andrew Robertson brought down Elliott Bennett on the right side of the penalty area.
Luke Freeman's inswinging free-kick caused havoc and the hosts appealed for handball before Agard pounced on the loose ball to net with a left-footed short on the turn.
Hull had to wait until the 73rd minute to equalise when Harry Maguire broke clear onto a Mohamed Diame flick and produced an emphatic right-footed finish with only Frank Fielding to beat.
Brentford striker Andre Gray could be set for a big-money move to Bristol City.
Press Association Sport understands City have met the Bees' valuation for the 24-year-old, which is believed to be around £9million.
Gray was also a target for Sky Bet Championship rivals Hull, but they were unwilling to meet the asking price.
Championship side Bristol City are hoping to sign Dwight Gayle from Crystal Palace after manager Steve Cotterill said the Premier League club have accepted their bid for the English forward.
Gayle, who would have to drop a division if the transfer goes ahead, has yet to speak to the Robins about the potential deal.
The striker, 24, joined Palace from Peterborough for a reported £6m in July 2013 and scored five Premier League goals for the club last season.
"He's someone we'd like to have at the football club," Cotterill said. "We've had a bid accepted and that's as far as it's gone.
"We need to speak to the player and his agent. I don't think anything has changed whilst we've been playing."
Fans, players, coaches and the manager all celebrated as Bristol City secured promotion after a 6-0 win at Valley Parade.Read the full story ›
Bristol City became the first side in the Football League to win promotion as they booked their place in next season's Sky Bet Championship by battering Bradford 6-0.
The Robins reached 92 points with their 27th league victory of the season at Valley Parade thanks to James Tavernier's brace and further goals from Joe Bryan, Luke Ayling, Aden Flint and Aaron Wilbraham.
Tavernier, who went up as a Rotherham player out of League One last year, fired in the opener after his initial effort was blocked before Bryan jumped highest to double Bristol City's advantage.
Ayling's fortuitous effort made it 3-0 after the break, Flint then headed a free-kick home, Tavernier stabbed in his second and Wilbraham rolled home a sixth to seal victory and promotion.
Bristol City's march towards the Sky Bet League One title was checked as they were held for the second game running in a 1-1 draw at OldhamRead the full story ›
Bristol City have expressed their disappointment with Fifa's decision to only fine West Ham for fielding Diafra Sakho against them in the FA Cup.
The Senegalese striker scored the only goal of the game, despite being made unavailable for selection for the Africa Cup of Nations.
Bristol City FC notes FIFA's decision with regards to the Disciplinary Committee's case against West Ham United and their player Diafra Sakho.
The club is disappointed with the penalty handed down by the FIFA Disciplinary Committee and is considering its options.
The club will be making no further comment at this time.
Diafra Sakho's second-half header was enough for West Ham to progress in the FA Cup at Bristol City's expense.
The League One club were the better side in the first period and had two efforts cleared off the line.
West Ham struggled to make chances, but good work from Andy Carroll set up Sakho to nod in at the far post.
#BristolCity v West Ham United: Fielding, Little, Bryan, Ayling, Flint, Williams, K.Smith, Saville, Freeman, M.Smith, Emmanuel-Thomas.