BRISTOL CITY 2 BORO 1
BRISTOL CITY: Gerken, Wilson, McCombe, Carey, Fontaine, McAllister, Elliott, Hartley, Skuse, Maynard (Sproule 90), Haynes (Akinde 52).
BORO: Coyne, McMahon, Wheater, Grounds, Taylor, Adam Johnson, Arca, Williams, Yeates, Lita, Emnes (Aliadiere 71).
Nicky Maynard grabbed a brace as Bristol City maintained their 100% home league record with a dramatic victory over Middlesbrough at Ashton Gate.
Maynard opened the scoring for the hosts in the 63rd minute with a superb strike but the visitors looked to have rescued a draw when Adam Johnson levelled from the spot with 11 minutes remaining.
However, Maynard popped up in injury-time to steal all three points for the Robins - converting Paul Hartley's cross with a cool volleyed finish.
The goal ensured Middlesbrough tasted defeat in the league for the first time this season and rounded off a miserable week for the Teessiders following the departures of Robert Huth and Tuncay Sanli to Stoke.
Boro had actually had the better of a hard-fought first half, but they were unable to find a way past Dean Gerken in the City goal.
Robins boss Gary Johnson made four changes to his side following their disappointing 2-0 Carling Cup defeat against Carlisle in midweek, with Maynard, Hartley, Brian Wilson and Jamie McCombe earning recalls.
Middlesbrough, meanwhile, brought in Jonathan Grounds at the heart of defence in place of Huth, with fellow centre-half David Wheater taking the captain's armband.
The visitors were the first to threaten in the seventh minute, as former Robins striker Leroy Lita tricked his way past McCombe before firing in a powerful shot that was well saved by Gerken.
City responded with Maynard volleying over from 20 yards, but the hosts spent most of the remainder of the half on the back foot.
Middlesbrough winger Johnson tested Gerken from the edge of the area after 25 minutes, while Haynes came close for the hosts two minutes later when he shot wide from 12 yards.
Yeates then saw his close-range effort well saved by Gerken and Marvin Emnes blasted over the crossbar as the visitors started to get on top.
Lita tested Gerken again after 39 minutes and Wheater also had a chance to put Middlesbrough ahead before the interval, but he headed over from Johnson's free-kick.
The hosts started the second half brightly, with Louis Carey heading a Hartley free-kick into the hands of visiting keeper Danny Coyne.
Maynard saw another volley comfortably saved by Coyne shortly after the hour mark as the hosts started to enjoy their best spell of the game.
And it was Maynard who gave City the lead soon after, getting the better of Grounds before curling a superb shot into the top-right corner.
Middlesbrough struggled to respond to the setback but earned a reprieve when Carey was adjudged to have handled in the box.
Johnson calmly tucked away the resulting spot-kick and Jeremie Aliadiere could have put Boro ahead soon after, only to blaze over when clean through on goal.
With the final whistle approaching, Maynard then grabbed his fifth goal of the season in all competitions to secure victory for the hosts.