Bristol City upset Middlesbrough at a foggy Riverside Stadium to end their 11-game winless run and climb out of the Championship relegation zone.
The Robins took a shock lead through an Albert Adomah close-range finish that slipped under Boro keeper Jason Steele.
Ishmael Miller fired in following Grant Leadbitter's corner to equalise, but Neil Danns teed up Stephen Pearson to restore the visitors' advantage.
Substitute Steven Davies curled in from Adomah's pass to wrap up the points.
It was City's first victory since September 18 and moved them above Ipswich and Sheffield Wednesday into 21st place.
They opened the scoring when Joe Bryan got to the byline and fed Adomah, whose effort from just inside the six-yard box squirmed through Steele.
Four minutes later, Boro striker Lukas Jutkiewicz had a fine chance to equalise but headed wide when from Miller's cross.
Ryan Taylor was causing the Boro defence problems and he felt he should have had a penalty, believing he was fouled by Andre Bikey.
But it was not given and Boro equalised when Miller fired home his third goal of the season from close range after a Leadbitter corner was not cleared.
The fog thickened as the second half began and both sides had decent chances despite the poor conditions.
City keeper Tom Heaton punched the ball against his own post before Neil Kilkenny hacked the ball clear.
At the other end Adomah came close to a second of the afternoon before the lead was restored as Leicester loanee Danns supplied Pearson and he fired home from inside the box.
Heaton had to make a top-class save to deny substitute McDonald to keep the advantage intact, and with two minutes left Davies converted his eighth goal of the season from Adomah's pass.
Middlesbrough boss Tony Mowbray: "The result was disappointing and frustrating but that is down to the way we performed, and it must be said, the way Bristol performed. They played well on the counter.
"Things just didn't go to plan. We went more direct and it didn't pan out. We changed the shape for the right reasons but it didn't come off.
"But you can't over-analyse it. We are still in the top six and there are still plenty of games to play. Luckily we have another one here on Tuesday night against Huddersfield, so we can put it right quickly."
Bristol City manager Derek McInnes: "We played well at times in the early part of the campaign but that was as good a performance as we have put in all season. I was delighted for the lads and for the supporters.
"We expected Middlesbrough to attack us with the two men up front and we knew it would be tough, we knew we would have to work hard and keep our shape.
"We did that. I thought we contained them well and I thought we controlled the game for long spells and with that came a bit of confidence.
"That showed in how we attacked. We scored three very good goals. We got into some very good areas and created some good chances."