Substitute Marvin Johnson scored a late winner against Nottingham Forest to stretch Middlesbrough's unbeaten run to eight games.
Johnson volleyed home just three minutes after coming off the bench, meeting a George Saville cross at the back post for his first league goal for 13 months.
Middlesbrough threatened a number of times, with Marcus Tavernier sending their best first-half chance wastefully over the bar after Brice Samba foiled Britt Assombalonga.
After Johnson's late goal, Marcus Bettinelli ensured maximum points by smothering an injury-time shot from Cafu on a day that the hosts marked the death of former England World Cup winner and Boro midfielder Nobby Stiles.