Derby County 2-1 Middlesbrough
Conor Sammon scored a last-minute winner as Derby boss Steve McClaren led the Rams to victory against his former club Middlesbrough.
Boro played most of the match with 10 men after Curtis Main received two bookings, and they went behind when Chris Martin prodded home.
Dean Whitehead lashed in an unlikely equaliser with 16 minutes left after fine work from Mustapha Carayol.
But the Rams pinched it when Sammon latched onto a bouncing ball to score.
McClaren, in his first managerial game against his old club, saw his new team emerge somewhat fortunate victors as the Rams extended their winning run to four matches.
After a slow start, the pendulum swung Derby's way in the 33rd minute when Boro striker Main left his foot in on Rams defender Jake Buxton and was shown a second yellow card.
Boro's Albert Adomah then had a shot saved after a fine solo run, before Derby took the lead in first-half stoppage time when Craig Bryson's low cross was converted by the sprawling Martin.
The visitors levelled when Carayol ran the length of Derby's half and cut the ball back to Rhys Williams, whose effort rebounded for Whitehead to drive home his first goal for the club.
Derby struggled to muster a response, but they snatched victory at the death when Sammon beat stranded Boro keeper Shay Given to end a gritty rearguard action.
Derby boss Steve McClaren:
"It's three points. That's it. It was not a good performance by our normal standards.
"The Championship is tough and there are different ways you have to win. We won it despite not playing our usual brand of football and we were disappointing in that.
"I wouldn't say we were lucky as we kept our patience. We waited for the moment and took it. They're the kinds of things teams have if they're going to be successful."
Middlesbrough head coach Aitor Karanka:
"To concede goals at the end of both halves, we felt bad. I saw I have a team that is together, everyone was helping each other and fighting the same battle and I was very happy about that.
"It was very encouraging. When you lose the way we did, you cannot really say anything to the players.
"I would like to know why (Main) was sent off. If he deserved two yellow cards, then you would be ending every game with six or seven players."