Bottom club Rotherham's second-half curse struck again as they went down 1-0 in their Championship clash at Bristol City to suffer their 15th away defeat of the season.
The Millers had frustrated the home side, without a win in nine matches, to such a degree that the Ashton Gate crowd were booing players and chanting abuse at manager Lee Johnson.
But, as so often in this campaign, Rotherham couldn't hold out after an encouraging first half and fell to a 72nd-minute header from substitute Milan Djuric.
Until then, they had been well in the game. Afterwards, their lack of attacking quality told as the Robins held on to their advantage comfortably.
In a scrappy opening period, both teams wasted golden chances to score.
After 14 minutes, Bristol's Tammy Abraham shot wide of the post with only Rotherham goalkeeper Richard O'Donnell, playing against his old club, to beat.
Four minutes later, Joe Newell found Danny Ward with a low pass from the right only for the Rotherham striker to sweep his effort inches off target
The Millers were close to going in front on the stroke of half-time when Anthony Forde crossed from the right and Mark Little almost put the ball into his own net in his attempt to clear.
New signing Ben Purrington showed up well on his Rotherham debut at left-back. Joe Mattock moved to left midfield and Newell switched to a central role as Tom Adeyemi hadn't recovered from illness.
Fellow new boy centre-half Joel Ekstrand, signed on Thursday, wasn't in the squad and missed out on the chance to play against his former club as he is short of match fitness.
After the break, in a second period no better than the first as a spectacle, Abraham's header was superbly saved by O'Connell on 57 minutes.
The crowd bayed their disapproval soon after when the centre-forward was brought off, but it was his replacement who would go on to bag the winner and leave the Millers 15 points from safety.
Bristol City (4-2-3-1): Giefer; Little (Paterson 58), Wright, Flint, Golbourne; Hegeler, Pack; Cotterill, Tomlin (Taylor 58), Bryan; Abraham (Djuric 58). Subs not used: Fielding, Vyner, Brownhill, O'Dowda.
Rotherham United (4-1-4-1): O'Donnell; Kelly (Blackstock 86), Ajayi, Wood, Purrington; Smallwood; Forde (Taylor 67), Vaulks, Newell, Mattock (Yates 63); Ward. Subs not used: Bilboe, Allan, Bray, Warren.
Goals: Djuric 72 (Bristol City).
Referee: Peter Bankes (Merseyside).
Attendance: 18,737 (210).