Aston Villa staged a remarkable fightback to claim all three points at the Riverside and virtually ensure their Premiership safety.
Villa's Craig Gardner is mobbed after his first-half equaliser
Thomas Sorensen gifted Middlesbrough a 12th-minute lead when he fumbled Fabio Rochemback's powerful free-kick.
But Craig Gardner equalised seconds before the break when he finished from Gabriel Agbonlahor's cross.
Luke Moore put Villa ahead from close range after 70 minutes before Stiliyan Petrov grabbed the killer third.
Villa have now come from behind 10 times in top flight matches this season - only Arsenal can top that - and the draw made it five unbeaten in the Premiership as leapt to 10th place in the table.
Boro captain George Boateng had the first real chance of the game against his former club when his tame shot was easily taken by Sorensen.
But at the other end Villa should really have taken the lead when Agbonlahor and Shaun Maloney both finished weakly when put into good positions.
Boro striker Yakubu saw his 25-yard dipping shot tipped over by Sorensen after six minutes while at the other end, Boro's Mark Schwarzer parried a fine effort from Maloney.
The breakthrough came, however, with a goal that will give Sorenson nightmares for years to come.
Phil Bardsley was yellow-carded for almost rugby-tackling Stewart Downing and from the resultant free-kick Rochemback unleashed a fierce drive from 25 yards.
Soresenen completely mis-handled the ball into the net, leaving the Danish keeper head-in-hands with embarrassment.
With Villa on the back foot, Middlesbrough continued to create openings with Yakubu their tormentor in chief.
In the 35th minute he teased the visitors' defence with a jinking dribble before feeding Adam Johnson, whose curling shot just drifted wide of Sorensen's right post.
But totally against the run of play, Villa equalised in first-half injury time.
Agbonlahor picked the ball out on the right and cut back into the box before threading a square ball to Gardner who slotted home from close range.
Despite that setback, Boro again started the second half positively with Johnson trying his luck with a long-range effort before being replaced by Lee Cattermole after 53 minutes.
The double substitution also saw Chris Riggott replacing crocked centre-half Robert Huth.
But Boro were hit with another sucker punch in the 69th minute. Ashley Young's free-kick was headed down by Martin Laursen and Moore was on hand to finish clincally from six yards.
This time, Boro looked unable to respond and Martin O'Neill's revitalised Villa side turned the screw when Petrov connected with Gareth Barry's pass to fire past Schwarzer.
Villa, who this time last week were in danger of being dragged into a relegation scrap, can now look at securing mid-table respectibility.
Boro meanwhile, are still stuck on 39 points after 32 games - their lowest tally in five seasons.
Middlesbrough boss Gareth Southgate:
"This result is very frustrating and we got what we deserved.
"If our attitude that we have done enough already this season to be safe then that is not acceptable.
"I have a smashing group of lads that I work with but they let themselves down badly. There are no positives that we can take out of this game."
Aston Villa boss Martin O'Neill:
"We started well, wasted a few chances and Middlesbrough got in front and had us on the back foot.
"But we got that little break just before the break and the second half was ours. In the end we won convincingly and I was very pleased
"We've got 42 points with four games to go and to be honest we're just as capable of winning those as losing them. But we're up to 10th and I think looking good."
Middlesbrough: Schwarzer, Xavier, Huth (Riggott 53), Woodgate, Taylor, Johnson (Cattermole 53), Boateng (Lee 76), Rochemback, Downing, Christie, Yakubu.
Subs Not Used: Jones, Parnaby. Booked: Cattermole, Taylor.
Goals: Rochemback 13.
Aston Villa: Sorensen, Bardsley, Mellberg, Laursen, Bouma, Gardner (Hughes 85), Petrov, Barry, Young (Davis 81), Maloney (Moore 66), Agbonlahor.
Subs Not Used: Taylor, Cahill.
Goals: Gardner 45, Moore 70, Petrov 77.
Ref: D Gallagher (Oxfordshire).