Burnley's Under-23s culminated their involvement in the Premier League Cup with a 5-3 win over Sunderland at Edgeley Park as striker Dan Agyei celebrated his recent involvement in the senior setup with a brace.
Qualification from Group B was an impossibility for the Clarets having fallen out of touch of the top two but Michael Jolley's side were aiming to delay their opponent's progression in the competition.
And they did just that in a highly entertaining clash at the home of Stockport County to temporarily leapfrog Cardiff City in to third spot.
The group leaders, who still have to play Blackburn Rovers next month, took charge of the tie early on but failed to make their pressure count.
Connor Mitchell was called in to action in the sixth minute, turning Josh Maja's shot behind at his near post after a penetrative run from the Black Cats forward.
The Northern Ireland under-21 goalkeeper was beaten from the resulting corner from defender Dan Casey's header but Jimmy Dunne was in the right place at the right time to clear the effort off the line.
Burnley's first sighting of goal came just after the clock ticked over in to double figures; trialist Harry Flowers kept the move alive when reclaiming possession and picking out Jamie Thomas who failed to test James Talbot with a curling shot.
Michael Jolley's men took the lead in the 21st minute when Agyei, included for the first time in Sean Dyche's matchday squad in the league at the KCOM Stadium, finished off a fine solo run.
The 19-year-old, who scored four times in 12 starts during a loan spell for Coventry in League One earlier in the season, broke from his own half, skipped between Casey and Sam Brotherton, and slotted the ball past Talbot at the near post.
Sunderland leveled on the half hour when Jimmy Dunne's block from Reece Greenwood provided the winger with a second bite of the cherry inside the box and he made no mistake, slamming the ball beyond Mitchell.
The visitors were ahead minutes later when Joel Asoro's incisive pass was as perfectly timed as Josh Maja's run in behind Burnley's backline and the forward applied a cool finish to make it 2-1.
But the hosts, skippered by Kevin Long, demonstrated great character to respond to the set back and get back on level terms shortly after.
After Long spared Arlen Birch's blushes - brilliantly blocking Maja's shot on the line after Greenwood capitalised on the full back's error - Agyei grabbed his second of the afternoon.
Seconds after Jamie Thomas went close, firing just wide of the far post when cutting back on to his right boot on the left hand side of the box, Dwight McNeil supplied a cross from a similar position and Agyei converted from close range.
The Clarets, rooted to the bottom of the group heading in to the fixture, then went in to the interval with the advantage, netting their third in first half stoppage time.
Dunne met McNeil's corner with a header at the back post, Talbot pushed the attempt on to his upright but the ball ricocheted back against the goalkeeper and travelled over the line.
It took just five minutes of the second half for Burnley to forge a two-goal cushion. Once Talbot denied Tristan Juneau with a stunning double save, Birch channelled his inner Henrikh Mkhitaryan and Oliver Giroud to beat Talbot with a wonderfully improvised scorpian flick from McNeil's resulting corner.
Jolley included four trialists in the squad for his side's final outing in the competition and it was the number 15, introduced as a substitute, who scored the pick of the goals.
Sunderland failed to clear their lines having stopped Agyei's run and from 25 yards out the midfielder thumped the ball across Talbot and in to the top corner.
Mitchell beat Elliot Embleton's drive to safety as Sunderland looked for a response and at the other end Agyei picked out the wrong side of the post when gunning for his hat-trick from McNeil's pass.
Maja reduced the deficit in the 85th minute, firing down the middle from the spot after being hacked down by Long inside the penalty area, but the Clarets held out to win 5-3.