Barnsley missed the chance to reach the last 16 of the Checkatrade Trophy after losing 5-3 on penalties to Manchester City Under-21s at Oakwell.
Mamadou Thiam failed to beat impressive goalkeeper Thomas Scott from the spot in the shootout after a thrilling tie had ended 3-3.
Victor Adeboyejo fired the Reds into an early lead, but City responded either side of half-time through Rabbi Matondo and Ian Carlo Poveda.
The Tykes hit back with goals in quick succession from Jordan Williams and Liam Lindsay, before in-form striker Cauley Woodrow missed a penalty.
However, Poveda’s second levelled things up and City held their nerve in the shootout to advance in a competition Barnsley had won the last time they competed in it in 2016.
There was good news before kick-off with Tykes volunteer Steve Croft back at Oakwell after suffering a cardiac arrest prior to the League One clash with Burton in September.
And Croft was on hand to see Adeboyejo, making a rare start with top-scorer Kieffer Moore on the bench as Daniel Stendel made six changes, break the deadlock in the 15th minute.
Williams received the ball from Woodrow and delivered a fine cross that the striker converted from close range.
The Reds were dominating and Woodrow thought he had added a second, but his tap-in from Thiam’s cross was ruled out for offside.
City’s youngsters started to settle, offering danger on the break, but they needed Scott on top form to stay only one goal behind.
The Leeds-born keeper produced a brilliant one-handed stop to prevent a Woodrow volley finding the net from an Adeboyejo cross.
However, City turned the game on its head with goals either side of half-time.
Matondo tapped in the rebound after Adam Davies had made a save before Poveda cut inside and fired home in the 58th minute.
But, as the tie swayed one way and then the other, Barnsley scored twice and missed a penalty in the space of seven minutes.
Williams took down Mike Bahre’s long ball over the top and calmly slotted home the equaliser, shortly before Lindsay superbly flicked in substitute Alex Mowatt’s corner.
Woodrow wasted the chance to make it 4-2, seeing his penalty saved by Scott, and Poveda took the game to a shootout by finding the bottom corner in the 74th minute.
Substitutes Mowatt, Moore and Jacob Brown all scored from 12 yards, but Thiam failed to find the net.
Barnsley: Davies, Pinnock, Lindsay, Bird (Moore 90), Potts, Bahre (Mowatt 60), J Williams, Pinillos, Woodrow (Brown 81), Thiam, Adeboyejo.
Subs: Greatorex, McGeehan, Moncur, B Williams.
Manchester City Under-21s: Scott, Frimpong, Sandler, Garcia (Rosler 76), Ogbeta, Pozo, Poveda, Bernabe (Nmecha 66), Richards, Matondo,Bolton (Dele-
Subs: Garre, Gomes, Diounkou, Moulden.
Referee: Ollie Yates