Bradford City pulled themselves out of the drop zone with an unexpected, but deserved win, their first for nine weeks.
A victory for the home side would have confirmed Bristol City in second place with a seven-point advantage over Yeovil Town and Nottingham Forest.
But, after scoring, first they were outplayed as their Brazilian keeper, Adriano Basso, let in two goals over his head.
Both sides could have had an early goal; Bristol when Brian Wilson was brought down inches outside the box and Bradford when Basso spilled a long shot from Marc Bridge-Wilkinson.
A misconceived clearance by Bradley Orr set up the Bradford chance but the right-back was the inspiration behind the Robins' 13th-minute goal.
Playing with three at the back, the Yorkshire side had a big gap down the right flank, where wing-back Ben Parker was far too far forward.
Orr put a ball into the gap, Enoch Showunmi carried it on to the by-line and chipped the keeper to present Phil Jevons with his season's 17th goal.
As the pressure stayed on them, Bradford picked up cards for Craig Bentham and Moses Ashikodi but hauled themselves into the game right on half-time.
Billy Paynter chested the ball down and his 35-yard shot caught Basso cold as it flew in.
Bradford then took a grip on the game in the first ten minutes after the break.
First, Joe Colbeck raced 45 yards down the right flank to set up a tap-in for Ashikodi.
Then, in the 55th minute, another long-range shot, this one by Steven Schumacher, caught out Basso again and Paynter was there on the line to confirm the ball was in.
The home side grabbed an injury-time goal back through Alex Russell, but they were well beaten on the night.