Middlesbrough overcame a spirited display from non-league Hastings to book a spot in the FA Cup fourth round.
Hastings goalkeeper Liam O'Brien saved a penalty from Ishmael Miller but could do nothing to keep out Merouane Zemmama's opener from 25 yards.
Andy Halliday prodded home before Zemmama made it 3-0 to the Championship side with a deflected shot.
Bradley Goldberg gave Hastings a moment to savour with a long-ranger but Miller pounced late on as Boro eased through.
There were 131 places separating Middlesbrough and Hastings but the Ryman Premier League side - the lowest-ranked team in the third round - put up a brave fight at the Riverside.
Their 1,068 travelling fans were in raptures after 17 minutes as O'Brien - who was only brought in from Barnet on Friday after an injury to regular keeper Matt Armstrong-Ford - guessed right to keep out Miller's 17th minute spot-kick after Miller had been fouled by Jamie Crellin.
Sadly for the non-leaguers, Boro made amends five minutes later when recalled midfielder Zemmama brilliantly curled the ball into the top corner from outside the area.
Hastings thought they had conjured a famous equaliser before half-time when Goldberg raced through to put the ball past keeper Jason Steele, but the striker was pulled back for a marginal offside.
Trailing by a single goal at half-time, Hastings still had hope but it was shattered two minutes after the break when a Luke Williams corner was poked home by Halliday.
A fine one-handed save from Steele denied Hastings midfielder Lee Carey before Zemmama made it 3-0 with heavily deflected shot from the edge of the box.
Then came the moment that will live long in the memories of the Hastings fans who made the trip to the north-east as Goldberg raced towards goal and unleashed a spectacular shot into the top corner.
The goal was sportingly applauded by the Middlesbrough fans, who soon had a fourth of their own to celebrate as Miller drove low past O'Brien with five minutes left.
Middlesbrough manager Tony Mowbray: "It was a credit to them that they tried to play football right from the off.
"I was pleased for them that they scored a great goal in front of their supporters. It was nice to be able to congratulate them afterwards.
"It was a bit patchy from us but FA Cups are about going through to the next round. It's important to keep the confidence and belief going no matter the name of the team you're playing.
"We got the job done, but we could have made it easier."
Hastings player-manager Sean Ray: "Seeing how happy our supporters were at the end is a memory I will savour for the rest of my life.
"I'm so pleased we were able to get a goal. Bradley has got that in his locker. He does it week in, week out and he is a threat whoever he plays against. He has got pace and he knows where the back of the net is.
"I thought were a bit overawed in the first half but we started to relax more and caused them one or two problems."