Match ends, Bristol City 5, Hull City 5.
Bristol City 5-5 Hull City
Joe Bryan's injury-time strike saw Bristol City keep alive their slim play-off hopes as they salvaged a draw with Hull in a thriller which they twice led by two goals.
Harry Wilson curled Hull ahead, but Marlon Pack's 25-yard shot and a Famara Diedhiou strike and header made it 3-1.
Fikayo Tomori headed Hull's second before Bobby Reid made it 4-2.
Strikes by Wilson, Abel Hernandez and Fraizer Campbell in a crazy 15 minutes saw Hull lead, only for Bryan to level.
But despite the euphoria of the late drama during 10 minutes of added time at Ashton Gate, the Robins are 10th in the table, three points adrift of Millwall in sixth with just two games remaining.
That gap looked certain to be just a point after City's sensational response to Wilson's early opener.
The hosts looked sharp and lively and created several chances before Pack's rasping effort and Diedhiou's close-range shot within three minutes of each other settled the nerves.
Diedhiou scored his second with a fine glancing header from Reid's cross after the break.
On-loan Chelsea defender Tomori's downward header - which went in off goalkeeper Frank Fielding and was later credited as an own goal - seemed to be of little consequence when Reid ran onto Diedhiou's pass to restore Bristol City's two-goal advantage with his his 20th league goal of the season.
However, a Wilson free-kick squirmed past Fielding to make it 4-3 and substitute Hernandez levelled with a deflected Kamil Grosicki cross for the eighth goal of the afternoon on 80 minutes.
Campbell's left-foot finish from another Grosicki cross seemed certain to have secured victory for Hull, only for left-back Bryan to curl home a brilliant 93rd-minute equaliser.
Hull are now certain of Championship survival, having lost just three times in 12 games.
Bristol City head coach Lee Johnson:
"We are all a bit shell-shocked. Having played well in the first half, we got ourselves 4-2 up and in a great position to take the points we needed.
"Our attacking play deserved even more goals but some of the defending was schoolboy errors.
"We will keep fighting, but obviously we now need a storming finish to the season and hope things go our way.
"Perhaps we lack enough leaders on the pitch. Players can be divided into followers, standard-setters and leaders and we need more to graduate from the second of those categories to the third."
Hull manager Nigel Adkins:
"We wanted to be in control of our own destiny today and it is great to achieve safety on the back of a positive result.
"Again the players have shown great character and a real sense of togetherness to twice come back from two goals down. Some of our attacking play was outstanding.
"Of course, I am not happy to concede five and there were some really poor ones from our point of view. But overall we have come out of a brilliant game to watch, having not been beaten by a team desperate to get into the play-offs.
"Now we want to continue building on our recent form in the last two games."
- 2PisanoBooked at 19mins
- 7SmithSubstituted forTaylorat 84'minutes
- 11O'DowdaSubstituted forBrownhillat 66'minutesSubstituted forDjuricat 90+8'minutes
- 1McGregorBooked at 90mins
- 34AinaSubstituted forTomoriat 44'minutes
- 50MacDonaldBooked at 89mins
- 16LarssonBooked at 79mins
- 22HenriksenBooked at 64mins
- 20BowenSubstituted forGrosickiat 63'minutes
- 4IrvineSubstituted forHernándezat 63'minutes
- 49H Wilson
- Oliver Langford
- Shots on Target
Second Half ends, Bristol City 5, Hull City 5.
Allan McGregor (Hull City) is shown the yellow card.
Stephen Kingsley (Hull City) wins a free kick in the defensive half.
Foul by Milan Djuric (Bristol City).
Substitution, Bristol City. Milan Djuric replaces Josh Brownhill because of an injury.
Delay over. They are ready to continue.
Delay in match Josh Brownhill (Bristol City) because of an injury.
Attempt saved. Abel Hernández (Hull City) left footed shot from the centre of the box is saved in the bottom left corner. Assisted by Kamil Grosicki.
Goal! Bristol City 5, Hull City 5. Joe Bryan (Bristol City) right footed shot from outside the box to the bottom right corner. Assisted by Famara Diedhiou.
Foul by Abel Hernández (Hull City).
Eros Pisano (Bristol City) wins a free kick in the defensive half.
Offside, Bristol City. Bobby Reid tries a through ball, but Aden Flint is caught offside.
Attempt missed. Aden Flint (Bristol City) header from the centre of the box is too high. Assisted by Josh Brownhill with a cross following a corner.
Corner, Bristol City. Conceded by Harry Wilson.
Attempt blocked. Bobby Reid (Bristol City) right footed shot from the right side of the box is blocked. Assisted by Nathan Baker with a headed pass.
Foul by Kamil Grosicki (Hull City).
Marlon Pack (Bristol City) wins a free kick in the defensive half.
Angus MacDonald (Hull City) is shown the yellow card.
Foul by Angus MacDonald (Hull City).
Aden Flint (Bristol City) wins a free kick in the attacking half.
Goal! Bristol City 4, Hull City 5. Fraizer Campbell (Hull City) left footed shot from the centre of the box to the centre of the goal. Assisted by Kamil Grosicki.
Markus Henriksen (Hull City) wins a free kick in the defensive half.
Foul by Nathan Baker (Bristol City).
Substitution, Bristol City. Matty Taylor replaces Korey Smith.
Corner, Bristol City. Conceded by Michael Dawson.
Attempt saved. Kamil Grosicki (Hull City) right footed shot from outside the box is saved in the top right corner. Assisted by Stephen Kingsley.
Foul by Fraizer Campbell (Hull City).
Nathan Baker (Bristol City) wins a free kick in the defensive half.
Goal! Bristol City 4, Hull City 4. Abel Hernández (Hull City) left footed shot from the centre of the box to the top left corner following a corner.
Corner, Hull City. Conceded by Marlon Pack.
Sebastian Larsson (Hull City) is shown the yellow card for a bad foul.
Foul by Sebastian Larsson (Hull City).
Josh Brownhill (Bristol City) wins a free kick in the attacking half.
Attempt missed. Josh Brownhill (Bristol City) right footed shot from outside the box is too high. Assisted by Jamie Paterson.
Attempt missed. Stephen Kingsley (Hull City) left footed shot from the left side of the box is close, but misses to the right. Assisted by Abel Hernández.
Attempt missed. Marlon Pack (Bristol City) right footed shot from outside the box is too high.
Goal! Bristol City 4, Hull City 3. Harry Wilson (Hull City) from a free kick with a left footed shot to the top right corner.
Harry Wilson (Hull City) wins a free kick on the right wing.
Foul by Joe Bryan (Bristol City).