Wes Burns headed an injury-time winner as managerless Bristol City defeated Championship leaders Middlesbrough.
City are now only in the relegation zone on goal difference while Boro's lead at the top is cut to two points.
Aden Flint headed against the bar moments earlier while Aaron Wilbraham's follow-up was cleared.
City were not to be denied as Flint and Burns scrambled in a stoppage-time corner to earn their fifth win of the season and do the double over Boro.
The goal brought to an end Boro's run of nine consecutive clean sheets as they also missed the opportunity to set a Football League record.
City, who sacked manager Steve Cotterill on Thursday, had John Pemberton and Wade Elliott leading the side.
The club also unveiled former Oxford United chief executive Mark Ashton as their new chief operating officer before the game.
Kike sent an early shot wide for Boro while Dimitrios Konstantopoulos saved well from City forward Burns.
Jonathan Kodjia's weak shot was kept out and Luke Ayling's header tipped over by Konstantopoulos while Albert Adomah lobbed over the bar for Boro.
The game looked to be heading for a draw before Burns diverted Flint's late header past the Boro keeper.
Full Time Match ends, Bristol City 1, Middlesbrough 0.
90:00 +7:40 Full timeFull Time Second Half ends, Bristol City 1, Middlesbrough 0.
90:00 +5:03 Goal scoredGoal! Goal! Bristol City 1, Middlesbrough 0. Wes Burns (Bristol City) header from very close range to the high centre of the goal. Assisted by Aden Flint following a corner.
90:00 +4:26Corner, Bristol City. Conceded by George Friend.
90:00 +4:02Attempt blocked. Marlon Pack (Bristol City) left footed shot from the centre of the box is blocked. Assisted by Wes Burns.
90:00 +3:46Attempt blocked. Joe Bryan (Bristol City) left footed shot from outside the box is blocked. Assisted by Scott Wagstaff.
90:00 +3:45Attempt blocked. Scott Wagstaff (Bristol City) left footed shot from outside the box is blocked.
90:00 +3:21 SubstitutionSubstitution Substitution, Bristol City. Mark Little replaces Nathan Baker because of an injury.
90:00 +3:06Corner, Bristol City. Conceded by Grant Leadbitter.
90:00 +1:17Delay over. They are ready to continue.
89:46Delay in match Nathan Baker (Bristol City) because of an injury.
89:24Corner, Bristol City. Conceded by Adam Forshaw.
89:20Aden Flint (Bristol City) hits the bar with a header from very close range following a set piece situation.
88:36Foul by Adam Forshaw (Middlesbrough).
88:36Aaron Wilbraham (Bristol City) wins a free kick in the attacking half.
87:39Dangerous play by David Nugent (Middlesbrough).
87:39Korey Smith (Bristol City) wins a free kick in the defensive half.
87:13 SubstitutionSubstitution Substitution, Middlesbrough. Adam Forshaw replaces Adam Clayton.
86:28George Friend (Middlesbrough) wins a free kick in the defensive half.
86:28Foul by Wes Burns (Bristol City).
Attempt missed. Cristhian Stuani (Middlesbrough) left footed shot from the centre of the box misses to the right. Assisted by George Friend with a headed pass.
82:10Attempt missed. Scott Wagstaff (Bristol City) right footed shot from outside the box is close, but misses to the left.
80:17Attempt missed. Albert Adomah (Middlesbrough) right footed shot from outside the box is too high following a set piece situation.
79:53 SubstitutionSubstitution Substitution, Bristol City. Aaron Wilbraham replaces Jonathan Kodjia.
79:11 BookingBooking Wes Burns (Bristol City) is shown the yellow card for a bad foul.
79:08George Friend (Middlesbrough) wins a free kick on the left wing.
79:08Foul by Wes Burns (Bristol City).
77:50Corner, Middlesbrough. Conceded by Luke Ayling.
76:01Attempt blocked. Stewart Downing (Middlesbrough) left footed shot from more than 40 yards on the left wing is blocked. Assisted by George Friend.
75:07Foul by Grant Leadbitter (Middlesbrough).
75:07Bobby Reid (Bristol City) wins a free kick on the right wing.
74:38Attempt blocked. Wes Burns (Bristol City) left footed shot from the right side of the box is blocked.
74:05Corner, Bristol City. Conceded by Dimitrios Konstantopoulos.
74:03Attempt saved. Luke Ayling (Bristol City) header from the centre of the box is saved in the top right corner. Assisted by Bobby Reid with a cross.
73:36Corner, Bristol City. Conceded by George Friend.
72:21 BookingBooking Fernando Amorebieta (Middlesbrough) is shown the yellow card for a bad foul.
72:03Foul by Fernando Amorebieta (Middlesbrough).
72:03Marlon Pack (Bristol City) wins a free kick in the attacking half.
71:21Attempt missed. Korey Smith (Bristol City) right footed shot from outside the box is too high. Assisted by Luke Ayling.
70:28 SubstitutionSubstitution Substitution, Bristol City. Scott Wagstaff replaces Derrick Williams.
69:52Attempt missed. Cristhian Stuani (Middlesbrough) header from the centre of the box misses to the right. Assisted by Albert Adomah with a cross.
69:30Attempt saved. Albert Adomah (Middlesbrough) right footed shot from outside the box is saved in the bottom left corner. Assisted by George Friend.
67:02Foul by Cristhian Stuani (Middlesbrough).
67:02Korey Smith (Bristol City) wins a free kick in the defensive half.
64:50Attempt saved. Jonathan Kodjia (Bristol City) right footed shot from outside the box is saved in the centre of the goal.
64:00Adam Clayton (Middlesbrough) wins a free kick in the attacking half.
64:00Foul by Bobby Reid (Bristol City).
63:37 SubstitutionSubstitution Substitution, Middlesbrough. David Nugent replaces Kike.
61:42 BookingBooking Adam Clayton (Middlesbrough) is shown the yellow card for a bad foul.
61:39Foul by Adam Clayton (Middlesbrough).
61:39Joe Bryan (Bristol City) wins a free kick on the left wing.
59:25Attempt missed. Jonathan Kodjia (Bristol City) left footed shot from outside the box is high and wide to the left. Assisted by Joe Bryan following a fast break.
59:04Attempt blocked. Stewart Downing (Middlesbrough) left footed shot from outside the box is blocked.
57:43Albert Adomah (Middlesbrough) wins a free kick in the attacking half.
57:43Foul by Jonathan Kodjia (Bristol City).
55:26 BookingBooking Luke Ayling (Bristol City) is shown the yellow card for hand ball.
55:13Hand ball by Luke Ayling (Bristol City).
53:22Attempt blocked. Bobby Reid (Bristol City) right footed shot from outside the box is blocked. Assisted by Marlon Pack.
48:34Attempt missed. Luke Ayling (Bristol City) left footed shot from outside the box is too high. Assisted by Marlon Pack.
45:00Second Half begins Bristol City 0, Middlesbrough 0.
45:00 +1:09 Half timeHalf Time First Half ends, Bristol City 0, Middlesbrough 0.
44:41Daniel Ayala (Middlesbrough) wins a free kick in the defensive half.
44:41Foul by Nathan Baker (Bristol City).
44:08Corner, Bristol City. Conceded by Daniel Ayala.
42:44Foul by George Friend (Middlesbrough).
42:44Wes Burns (Bristol City) wins a free kick on the right wing.
41:25Offside, Middlesbrough. Grant Leadbitter tries a through ball, but Cristhian Stuani is caught offside.
38:31Foul by George Friend (Middlesbrough).
38:31Luke Ayling (Bristol City) wins a free kick on the right wing.
36:31Attempt missed. Nathan Baker (Bristol City) header from the centre of the box misses to the right. Assisted by Bobby Reid with a cross following a set piece situation.
36:00Foul by Daniel Ayala (Middlesbrough).
36:00Jonathan Kodjia (Bristol City) wins a free kick on the left wing.
35:13Albert Adomah (Middlesbrough) wins a free kick on the left wing.
35:13Foul by Korey Smith (Bristol City).
33:58Foul by Adam Clayton (Middlesbrough).
33:58Bobby Reid (Bristol City) wins a free kick in the attacking half.
33:17Foul by Kike (Middlesbrough).
33:17Aden Flint (Bristol City) wins a free kick in the defensive half.
33:12Attempt blocked. Stewart Downing (Middlesbrough) right footed shot from outside the box is blocked. Assisted by Albert Adomah.
28:27Offside, Middlesbrough. Daniel Ayala tries a through ball, but Kike is caught offside.
27:52Delay over. They are ready to continue.
25:58Delay in match Korey Smith (Bristol City) because of an injury.
23:50Attempt blocked. Kike (Middlesbrough) right footed shot from the left side of the box is blocked.
23:08Attempt missed. Aden Flint (Bristol City) right footed shot from the centre of the box is high and wide to the right. Assisted by Bobby Reid with a cross following a corner.
22:43Corner, Bristol City. Conceded by Dimitrios Konstantopoulos.
22:41Attempt saved. Wes Burns (Bristol City) right footed shot from the left side of the box is saved in the top right corner. Assisted by Derrick Williams.
21:24Attempt saved. Cristhian Stuani (Middlesbrough) right footed shot from the right side of the box is saved in the bottom left corner. Assisted by Kike.
20:09Attempt missed. Kike (Middlesbrough) left footed shot from the centre of the box misses to the left. Assisted by Daniel Ayala with a cross.
18:33Joe Bryan (Bristol City) wins a free kick in the defensive half.
18:33Foul by Nsue (Middlesbrough).
17:47Foul by Marlon Pack (Bristol City).
17:47Grant Leadbitter (Middlesbrough) wins a free kick in the defensive half.
16:44Offside, Middlesbrough. Adam Clayton tries a through ball, but Cristhian Stuani is caught offside.
15:31Attempt saved. Wes Burns (Bristol City) right footed shot from the centre of the box is saved in the centre of the goal. Assisted by Jonathan Kodjia with a headed pass.
12:10Foul by Cristhian Stuani (Middlesbrough).
12:10Korey Smith (Bristol City) wins a free kick in the defensive half.
10:56Corner, Middlesbrough. Conceded by Aden Flint.
10:22Corner, Middlesbrough. Conceded by Derrick Williams.
8:18Marlon Pack (Bristol City) wins a free kick in the defensive half.
8:18Foul by Stewart Downing (Middlesbrough).
7:29Foul by Derrick Williams (Bristol City).
7:29Adam Clayton (Middlesbrough) wins a free kick on the right wing.
4:48Attempt missed. Albert Adomah (Middlesbrough) right footed shot from the centre of the box is high and wide to the left.
4:41Attempt blocked. Cristhian Stuani (Middlesbrough) right footed shot from the right side of the box is blocked. Assisted by Nsue.
3:47Foul by Marlon Pack (Bristol City).
3:47George Friend (Middlesbrough) wins a free kick in the defensive half.
0:00First Half begins.
0:00Lineups are announced and players are warming up.
Live data and text provided by our data suppliers