A second-half Ishmael Miller strike has denied Peterborough United a point despite the hosts staging a comeback to equalise after Faris Haroun's early double.
Middlesbrough were ahead in the eighth minute after an Andrew Halliday clearance fell to Lee Tomlin, who worked space on the right and crossed for Haroun to find the bottom corner.
Peterborough's defence was all over the place and Scott McDonald had a chance to add a second but Robert Olejnik saved well.
It was 2-0 on 20 minutes and it again came from a cross from the right. This time it was Stuart Parnaby who delivered for Faroun to finish from close range.
Peterborough were pressing for the equaliser but both George Boyd and George Thorne could not hit the target with their efforts.
They did indeed get a goal back in the 38th minute and it was a great strike from Dwight Gayle, who shimmied one way before firing high into the net.
The on-loan striker, who last season was playing non-league football, netted his side's equaliser on 52 minutes from a Michael Bostwick assist, with Peterborough now on top.
However, Middlesbrough regrouped and were back ahead after 76 minutes after substitute Ishmael Miller fired low into the corner, despite Peterborough's dominance.
The goal seemed to knock the wind out of Peterborough and chances became hard to come by at London Road.