Last updated on .From the section Football

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?

Rudy Gestede's acrobatic scissor-kick doubled Middlesbrough's lead before the break

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

Chris Maguire's free-kick sparked Oxford's second-half comeback

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)

Maguire's free-kick was worthy of winning any game and the Scot was unfortunate to be on the losing side after an impressive second-half performance

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."

What's next?

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).