A freak own goal from Nottingham Forest midfielder Ryan Yates set Middlesbrough on their way to a victory that moved them into the Championship's top six.
The home side were totally dominant in the first 45 minutes but took the lead in highly unusual fashion when Yates overhit a backpass to goalkeeper Brice Samba and the ball ended up in the net.
Forest improved after the break and should have levelled when Philip Zinckernagel blazed over from close range.
Andraz Sporar smashed home on the rebound, after Samba had parried a cross out into the middle of the goal, before Reds substitute Xande Silva saw a shot come back off the post as Forest nearly set up a dramatic finale.