Grimsby Town lost their final Checkatrade Trophy group game as Newcastle United Under-21s took all three points at Blundell Park.
The Mariners started well and took the lead through JJ Hooper but a confident and skilful Newcastle side worked their way back into the game, equalising through Callum Roberts before Elias Sorensen gave them the lead.
Town levelled the scores with a brilliant overhead kick by Jordan Cook but they were unable to take the game to penalties as Matthew Longstaff's free kick restored the away side's lead and proved decisive.
Grimsby boss Michael Jolley changed his entire starting XI from Saturday's FA Cup victory over MK Dons as he gave others in his squad their chance to impress.
Goalkeeper Sam Russell started behind a defence of Reece Hall-Johnson, Alex Whitmore, Andrew Fox and Paul Dixon.
John Welsh and Martyn Woolford began in the centre of midfield, with Ahkeem Rose, Hooper, Cook and Harry Cardwell completing the line-up.
The substitutes were Ollie Battersby, Max Wright, Louis Robles, Jake Hessenthaler, Harry Davis, Luke Hendrie and Harry Clifton.
Newcastle included eight players from Tyneside among their starting line-up, with Danish striker Sorensen leading the line.
Town were given a chance when Rose was fouled in a central position, on the edge of the penalty area, on five minutes. They were unable to trouble visiting keeper Nathan Harker though, as Cardwell's low shot from the free kick was blocked.
The next time they went forward though, the Mariners took the lead. A good header by Rose sent Cook away down the left and his ball into the middle found HOOPER, whose drive fro the edge of the box hit the back of the net.
Newcastle's response saw Sorensen denied by a good sliding challenge from Fox, before a corner from the left was headed over the bar by Sean Longstaff for a goal kick.
The visitors got themseelves back on level terms on 18 minutes when a low cross from Sorensen on the left found ROBERTS, whose assured finish beat Russell and went into the bottom corner.
Woolford was booked for a foul three minutes later but the free kick did not lead to a goalscoring opportunity, then a header from Hooper at the other end went wide after he had met a cross from Fox.
The away side completed the turnaround on 26 minutes as they took the lead for the first time in the game. Roberts set off on a run through the middle before playing a perfect chipped cross for SORENSEN to head home at the far post.
Town immediately set about trying to find an equaliser and they won a corner when a low shot which looked to be heading off-target took a heavy deflection and went across goal. The flag-kick came to nothing.
Woolford tried his luck from 25 yards on the half-hour but his curling shot went wide of the far post.
A foul on Rosaire Longelo then gave Newcastle another free kick inside the Grimsby half but Roberts hammered his shot high into the Pontoon Stand.
Cook had a chance to make it 2-2 soon afterwards as he made his way into the penalty area on the right but he could only shoot into the side-netting.
A cross from Rose was blocked for a corner on the left on 36 minutes but Fox's delivery was eventually cleared after it had been headed on, before a deep cross from the left was prodded wide by Cook.
Two added minutes were played at the end of the half and with no further chances for either side before the referee's whistle, Newcastle retained their advantage at the break.
No changes were made before the restart and after a quiet opening to the second half, a push by Dixon gave away a free kick inside the Town half, which was headed clear by Whitmore.
The Mariners caame to life on 53 minutes when they drew level. A cross from Hall-Johnson on the right was deflected an the ball found its way to COOK, whose acrobatic overhead kick beat Harker and went into the roof of the net.
A Newcastle free kick from the right was headed clear as the visitors looked to re-establish their advantage, before a foul brought another free kick, this time right on the edge of the box. Russell was not called into action as the ball was struck over the bar and into the Osmond Stand.
Rose went down with an injury and was eventually replaced by Robles as Town made the first substitution on 65 minutes.
Longelo was replaced by Adam Wilson for the visitors at the same time, before Hooper shot at keeper Harker.
Yannick Toure came on in place of Sorensen for Newcastle before a corner from the left, which was dealt with by the Town defence.
A corner at the other end also failed to produce a chance in front of goal, before a good advantage allowed by the referee let Newcastle mount a dangerous looking attack, only for the ball to roll across goal before being cleared by Hall-Johnson.
Soon afterwards, there was a good chance for Newcastle to make it 3-2 when Sean Longstaff was played in through the middle but he was denied by Russell.
A foul by Robles on Roberts on the edge of the penalty area gave the away side another free kick and from it, they did regain their advantage as M LONGSTAFF curled a low shot around the Town wall and into the far orner of the net.
Wright replaced Cardwell for the last 12 minutes of the contest, before Hall-Johnson sent a volley wide after meeting a cross from the left.
Juan Cumbreras came on for Thomas Allan and Hendrie replaced Hall-Johnson as both sides made their final change with five minutes to go.
Toure fired wide from 20 yards as the away side looked for a third goal which would seal all three points.
Five added minutes were played at the end of the game, with Town pushing forward in search of an equaliser which would take the game to a penalty shoot-out.
A good ball from Cook found Wright but his cross was cleared in what proved to be the home side's last chaance to get anything from the game.
That meant Newcastle ttook maximum points andd completed a clean sweep of three wins from teir three group games to progress to the next round.
The other team to qualify from the group will be decided tomorrow, when Doncaster Rovers - currently level with the Mariners on three points - take on Notts County, who have been beaten in both of their games so far.
23 Sam Russell
2 Reece Hall-Johnson
19 Andrew Fox
25 Alex Whitmore
3 Paul Dixon
16 Martyn Woolford
9 JJ Hooper
4 John Welsh (C)
11 Jordan Cook
21 Ahkeem Rose
17 Harry Cardwell
28 Ollie Battersby
24 Harry Davis
27 Luke Hendrie
15 Harry Clifton
7 Jake Hessenthaler
20 Max Wright
14 Louis Robles
29 Nathan Harker
47 Matthew Longstaff
33 Liam Gibson
53 Kelland Watts
39 Stefan O'Connor
52 Owen Bailey (C)
54 Thomas Allan
36 Sean Longstaff
37 Callum Roberts
14 Rosarie Longelo
51 Elias Sorensen
32 Otto Huuhtanen
59 Oliver Walters
60 Adam Wilson
55 Yannick Toure
Referee: Thomas Bramall
Attendance: 547 (66)
Next Up: Crawley Town (H)