Cayton Corinthians fought back from going behind after two minutes to win 2-1 at Catterick Garrison to book their place in the quarter-finals.
The early concession of a goal after a freakish free-kick was followed five minutes later by an injury to keeper Christian Bowes which forced him to come off, and then on 37 minutes another player went off injured to add to the visitors' woes.
However the Cayton players battled hard in the second half, with committed performance from everyone including stand-in keeper Luke Dunn and early used subs Brandon Clayton and Joseph Huntley.
RETRO SPOTLIGHT: 15 nostalgic Scarborough photos from the Scarborough News sports archives
Scarborough Athletic slip to 2-0 defeat at Brackley Town in National League North opener
Ebberston battle back to sink hosts Filey in SBL Premier Division thriller
Commonwealth Games 2022: Scarborough's Chris Turnbull and Team England win bowls mixed para pairs bronze medal
Jack Carradice-Clarkson takes 6-11 as Flamborough sink Wold Newton
Captain Leeroy Donaldson was solid at centre back.
Brad Atkinson equalised on the hour mark after a scramble in the box.
Then 10 minutes later Brad Atkinson beat three players with some superb close control, then laid the ball off to Jack Adams who hit the ball sweetly into the top corner.
Cayton player-boss Steven Frederiksen said: "The lads remained focused for the final 20 minutes of the game and saw out the 2-1 victory.
Trafalgar also booked their place in the quarter-finals with a 5-0 home win against Coulby Newham.
The visitors had not lost a game in the Stockton Sunday League before this cup encounter, but they had no answer for an in-form Traf team
Sean Exley led the way with a brace for the hosts, while Mike Barker,, Luke Jones and Joel Ramm also notched.
Boss Jamie Patterson said: "Man of match was all the team with our best performance of the season, it was a great performance."
The Valley suffered a 4-1 loss against Grangetown Boys Club.