The League One manager spoke of his frustration, his Premier League counterpart of relief. In many ways it an afternoon for the unexpected at the Riverside, apart that is from the outcome. Middlesbrough progressed, but quite how remains rather baffling.

For Michael Appleton, the over-riding emotion was one of what might have after Oxford came within four minutes of a place in the draw for the sixth round of the FA Cup. A replay and with it the club's furthest progression in the competition since a side containing a certain Ron Atkinson reached that stage 53 years ago beckoned after a stirring second-half comeback saw the League One side wipe out a two goal deficit in the space of 60 dramatic seconds.

They were full value for a second crack at their lofty opponents when substitute Cristhian Stuani, a man with a track record of scoring important goals, popped up at the far post to add another to his collection as he steered home a late winner which rather flattered the hosts. "He's a vital player for us and I don't think he gets the credit he deserves," Aitor Karanka reflected afterwards.

Chris Maguire scored with a superb second-half free-kick (Getty Images)

"I thought there was only going to be one team going to win it when we levelled," insisted Appleton, whose side looked in danger of being on the wrong end of an embarrassing scoreline after falling two goals behind 10 minutes before the interval. The Oxford manager added: "I suppose tomorrow at some point I'll probably feel even more proud, but at the moment I'm just really frustrated.

"To concede a goal like we did to lose it was hard to take. In many ways it was a League One goal, not a Premier League goal because they didn't play through us." Fabio crossed, Alvaro Negredo applied an unwitting touch as he wrestled with his marker Curtis Nelson and there was Stuani, scorer of the goal against Brighton here in May which clinched promotion, to apply a close range finish.

Leadbitter gave his side the lead with a confident strike from the penalty spot (Getty Images)

"Negredo was grabbing Curtis to stop him attacking the ball so we've got issues with the winning goal," added Appleton, who praised Middlesbrough supporters for the way they stuck with their side in the wake of Oxford's unlikely comeback after the hour. They had every right to question the capitulation as Chris Maguire, a ubiquitous figure throughout a pulsating contest, halved the deficit by curling in a 20 yard free-kick after Phil Edwards had been fouled by Adama Traore.

Barely had Oxford's 3,300 travelling fans had time to compute such a memorable occurrence when Toni Martinez followed up to stab the ball home from six yards after Brad Guzan parried Maguire's shot in the wake of Adam Clayton losing the ball on the edge of the box.

"We had the game completely under control," Karanka insisted as he prepares for Sunday's draw, the first time Middlesbrough have reached this stage in eight years, the season when they last surrendered their top flight status. The Spaniard is confident the club won't pay a similar price for continued progress in the competition this time, and he added: "Credit to Oxford for the way they fought back. It shows the dangers of thinking the game is won."

Gestede scored a a fine scissor kick (Getty Images)

With a comfortable two-goal lead at the interval, they could be forgiven for thinking just that. The contest swung decisively the way of the Premier League side in two pivotal moments just after the half-hour, when Oxford momentarily thought they had cancelled out Grant Leadbitter's 26th minute penalty courtesy of Maguire's angled drive from 20 yards. Celebrations were short-lived, however, referee Andre Marriner ruling the effort out due to Kane Hemmings' push on Bernardo.

Within two minutes, Middlesbrough had doubled their lead, Rudy Gestede scoring for the first time since a £6m move last month from Aston Villa with a fine scissor kick after Traore's knockback from Fabio's cross found the Middlesbrough forward via a fortuitous deflection off Nelson.

Leadbitter put the hosts ahead from the spot after Maguire's clumsy challenge on Stewart Downing, the midfielder who played an influential role in his side's victory.

Martinez equalised just a minute after Oxford's first goal (Getty Images)

Oxford spurned their clearest early opening after barely a minute, Martinez, the forward on loan from West Ham easily brushing-off Bernardo to run through on goal unimpeded before firing straight at Guzan. A simple square pass would have provided Hemmings, who had scored in each of the previous four rounds, with an unguarded net into which to roll his fifth goal of an eventful cup run, the euphoria of which will have to be quickly quelled with Tuesday's trip to Charlton on the horizon in the continued pursuit of what at this stage looks an unlikely quest to secure a play-off place.

"We've got another 16 cup finals to look forward to," insisted Appleton, whose side are also in the semi-finals of the EFL Trophy. "We'll probably need to win 10 of those to have anything to show for our efforts, but if we can string together performances like this, then we can."

Middlesbrough (4-2-3-1): Guzan; Chambers, Ayala, Bernardo, Ayala, Fabio; Clayton; Traore (Stuani 72), Leadbitter; Downing, Fischer (Ramirez 72); Gestede (Negredo 86). Subs: Valdes, Gibson, de Roon, Bamford.

Oxford United (4-4-2): Eastwood; Edwards, Dunkley, Nelson, Johnson; Hall, Lundstram, Ledson, Maguire; Hemmings (McAleny 64), Martinez (Sercombe 85). Subs: Agboola, Skarz, Ruffels, Rothwell, Raglan.