Match ends, Middlesbrough 0, Birmingham City 1.
Birmingham City won for the first time in seven Championship matches to dent Middlesbrough's play-off ambitions.
Scott Hogan's first-half goal was enough to secure all three points at the Riverside Stadium, with the striker finishing off a slick team move by tapping in Maxime Colin's low cross.
Boro almost equalised before half-time when Sam Morsy's header bounced down off the crossbar and on to the goalline before Blues keeper Neil Etheridge smothered the ball.
Duncan Watmore had the best chance to level the game in an improved second-half showing by the hosts, but saw his close-range half-volley saved by Etheridge.
Victory on Teesside lifted Aitor Karanka's side seven points clear of the relegation zone.
Returning Karanka frustrates former club
Former Real Madrid defender Karanka spent more than three years in charge of Boro - leading the club to promotion to the Premier League in 2015-16 - and denied his former employers the chance to move into the top six.
Birmingham were rewarded for their positive start when Hogan rounded off a move which included a brilliant backheel by winger Ivan Sanchez to set an overlapping Colin free inside the box.
The Teessiders may complain that the Spanish winger should have not been on the field, as Sanchez had appeared to kick out at Paddy McNair in an off-the-ball clash with the Boro centre-back.
After the visitors survived a scare from Morsy's header, which also missed the outstretched arm of Birmingham midfielder Jon Toral on the line, Etheridge was called into action at the end of the first half to tip over a free-kick from Marcus Tavernier, while Chuba Akpom saw a header deflected over the Blues bar.
Middlesbrough boss Neil Warnock made a triple substitution at the break, and the changes almost had an instant impact as Britt Assombalonga side-footed wide in the first minute of the second half.
Boro had won their past four at the Riverside and continued to press in the second half, but the Birmingham defence held firm to inflict just their second home defeat of the Championship campaign.
The Blues, meanwhile, have now picked up 18 of their 26 points this season away from St Andrew's.
Middlesbrough boss Neil Warnock told BBC Tees:
"We knew it would be physical and we didn't compete. We got bullied.
"They should have had a sending off, which would have changed everything. The lad lashed out and not one of the four officials could see it.
"Then the guy who should have been off [Sanchez] makes the goal and it's a double whammy.
"I don't think we would have scored if we had been playing until Sunday. We were better second half but the first half was as bad as I've seen."
Birmingham boss Aitor Karanka:
"I am very pleased with this performance. I hope this is a real sign of the future.
"We played well today for 45 minutes and then had to defend. We knew we had to defend really well against a good team, and we did.
"It's a nice feeling to have because the biggest challenge here has been changing the atmosphere.
"I thought I'd fixed it earlier in the season but it's been the same situation. It will be really important for sure."
- 2DijksteelBooked at 82mins
- 8WingSubstituted forSpenceat 45'minutes
- 5MorsySubstituted forHowsonat 45'minutes
- 7TavernierSubstituted forCoulsonat 76'minutes
- 10AkpomSubstituted forAssombalongaat 45'minutes
- 3JohnsonSubstituted forWatmoreat 64'minutes
- 19San José
- 34SunjicBooked at 71mins
- 23ToralBooked at 15minsSubstituted forRobertsat 62'minutes
- 11BelaSubstituted forClaytonat 90'minutes
- 9HoganSubstituted forJutkiewiczat 76'minutes
- Darren England
- Shots on Target
Second Half ends, Middlesbrough 0, Birmingham City 1.
Substitution, Birmingham City. Adam Clayton replaces Jérémie Bela.
Attempt blocked. Jérémie Bela (Birmingham City) right footed shot from outside the box is blocked. Assisted by Lukas Jutkiewicz.
Corner, Middlesbrough. Conceded by Mikel San José.
Foul by Marc Roberts (Birmingham City).
Britt Assombalonga (Middlesbrough) wins a free kick on the left wing.
Attempt missed. Lukas Jutkiewicz (Birmingham City) header from the centre of the box misses to the left. Assisted by Jérémie Bela with a cross following a corner.
Corner, Birmingham City. Conceded by Jonny Howson.
Anfernee Dijksteel (Middlesbrough) is shown the yellow card for a bad foul.
Jérémie Bela (Birmingham City) wins a free kick on the left wing.
Foul by Anfernee Dijksteel (Middlesbrough).
Foul by Maxime Colin (Birmingham City).
Hayden Coulson (Middlesbrough) wins a free kick in the defensive half.
Lukas Jutkiewicz (Birmingham City) wins a free kick in the attacking half.
Foul by Dael Fry (Middlesbrough).
Offside, Birmingham City. George Friend tries a through ball, but Lukas Jutkiewicz is caught offside.
Foul by Lukas Jutkiewicz (Birmingham City).
Patrick McNair (Middlesbrough) wins a free kick in the defensive half.
Substitution, Middlesbrough. Hayden Coulson replaces Marcus Tavernier.
- Remembering an icon: Hear how David Bowie always managed to stay ahead of his time
- Need a lift?: Joe Wicks and guests are here to bring positivity to your day