Match ends, Middlesbrough 3, Oxford United 2.
Middlesbrough scraped into the FA Cup quarter-finals after fending off a second-half comeback from League One Oxford United at the Riverside.
Substitute Cristhian Stuani tapped in at the back post four minutes from time to send the hosts through, after Oxford had doggedly fought back from 2-0 down.
Boro went in front in the first half when Grant Leadbitter thumped home from the spot after Stewart Downing was bundled over by Chris Maguire.
Maguire had an effort ruled out moments later, as Kane Hemmings was ruled to have fouled a defender, but Match of the Day pundits Trevor Sinclair and John Hartson both thought the goal should have stood.
And soon after Rudy Gestede doubled the Premier League side's lead with an acrobatic volley.
Maguire kick-started Oxford's recovery when he nonchalantly curled in a free-kick after the break and Toni Martinez levelled from close range 60 seconds later, but Stuani had the final word to send the hosts through.
Boro will find out their quarter-final opponents in Sunday's draw, which takes place at 18:30 GMT on the BBC News Channel, BBC Radio 5 live and the BBC Sport website.
Boro up for the cup?
Middlesbrough boss Aitor Karanka has made no secret of the fact Premier League survival remains his priority, but he has also expressed a desire to emulate fellow Spaniard Roberto Martinez and win the FA Cup.
Martinez's Wigan became the first side to lift the trophy and be relegated in the same season in 2013, and before the tie Karanka said his side must "keep belief and keep dreaming".
He made six changes to the side that drew 0-0 with Everton last time out, and the tinkering looked to have paid off after a dominant first-half display in which Leadbitter also clipped the crossbar with a wonderfully executed chip.
Boro's only wins since the turn of the year have come in the FA Cup, albeit having played lower-league opposition at home in every round.
After seeing off Sheffield Wednesday and Accrington Stanley, Oxford proved their toughest test yet and were unlucky not to earn a replay after becoming the first side to breach Boro's resolute defence in the cup.
Karanka will be relieved to avoid a trip to the Kassam Stadium, but is no doubt aware of the impact a run in the competition can have on league form - Boro dropped out of the top flight the last time they reached the final in 1997.
Agony for Oxford
Oxford have beaten eight teams from higher divisions since Michael Appleton took charge in 2014, including wins over Championship sides Newcastle and Rotherham in this season's run to the fifth round.
They could have been out of the tie after the first half, but two goals in a minute saw the momentum swing in the visitors' favour and Appleton said his side had Boro "on the ropes".
Having conceded a penalty in the first half, it was Maguire who proved the inspiration for the U's comeback with a hand in both goals.
Oxford will still harbour hopes of reaching Wembley this season with an EFL Trophy semi-final to come against Luton, but the Yellows' wait to reach a first FA Cup quarter-final in more than half a century continues.
Man of the match - Chris Maguire (Oxford)
Match stats - Home comforts for Gestede
- Middlesbrough scored two first-half goals for the first time in 2017.
- Rudy Gestede's last seven goals in all competitions have been scored at home.
- Middlesbrough had more shots on target in the opening 45 minutes v Oxford (7) than they have managed in any game this season.
- No player in the top four tiers of English football has scored more free-kick goals than Chris Maguire this season (5).
- There were exactly 60 seconds between Oxford's first goal and their equaliser.
Manager reaction - 'They were a bit star struck'
Middlesbrough manager Aitor Karanka: "It was a typical FA Cup game, so when you think everything is under control you concede two goals in one minute.
"If you lose your attention, even against a League One team, it is the biggest mistake. To compete in this country you always have to play 150%, even teams two divisions lower can create you problems.
"Three years ago I don't think anyone would believe we would be in the Premier League and the quarter-finals of the FA Cup."
Oxford United boss Michael Appleton: "In the first half a couple of players struggled with the occasion a bit, they were a bit star struck.
"In the second half we got back to plan and played in their half of the field. To get hit with a sucker punch like that is hard to take.
"I'm delighted the way they brought themselves back into the game. It's been a good run but I'm disappointed it's over as we wanted to win the game and we had them in the ropes at 2-2."
Middlesbrough return to Premier League action at relegation-threatened Crystal Palace next Saturday (15:00 GMT), while play-offs chasing Oxford United travel to Charlton Athletic in League One on Tuesday (19:45).
- 25ChambersBooked at 71mins
- 4AyalaBooked at 62mins
- 2da Silva
- 37TraoréSubstituted forStuaniat 72'minutes
- 29GestedeSubstituted forNegredoat 86'minutesBooked at 90mins
- 11FischerSubstituted forRamírezat 72'minutes
- 14de Roon
- 28JohnsonBooked at 90mins
- 23LedsonBooked at 76mins
- 15HemmingsSubstituted forMcAlenyat 67'minutes
- 7MartínezSubstituted forSercombeat 85'minutes
- Andre Marriner
- Shots on Target
Second Half ends, Middlesbrough 3, Oxford United 2.
Marvin Johnson (Oxford United) is shown the yellow card.
Álvaro Negredo (Middlesbrough) is shown the yellow card for a bad foul.
Foul by Álvaro Negredo (Middlesbrough).
Cheyenne Dunkley (Oxford United) wins a free kick in the defensive half.
Attempt missed. Chris Maguire (Oxford United) left footed shot from outside the box is high and wide to the left. Assisted by Ryan Ledson.
Goal! Middlesbrough 3, Oxford United 2. Cristhian Stuani (Middlesbrough) right footed shot from the right side of the six yard box to the bottom right corner. Assisted by Álvaro Negredo.
Attempt missed. Álvaro Negredo (Middlesbrough) right footed shot from the centre of the box misses to the right. Assisted by Fabio with a cross.
Substitution, Middlesbrough. Álvaro Negredo replaces Rudy Gestede.
Attempt missed. Conor McAleny (Oxford United) left footed shot from the centre of the box misses to the right. Assisted by Liam Sercombe.
Substitution, Oxford United. Liam Sercombe replaces Antonio Martínez because of an injury.
Delay over. They are ready to continue.
Delay in match Antonio Martínez (Oxford United) because of an injury.
Foul by Gastón Ramírez (Middlesbrough).
Marvin Johnson (Oxford United) wins a free kick in the defensive half.
Corner, Oxford United. Conceded by Daniel Ayala.
Foul by Bernardo (Middlesbrough).
Antonio Martínez (Oxford United) wins a free kick on the right wing.
Foul by Gastón Ramírez (Middlesbrough).