City ended their Checkatrade Trophy campaign for the season with a narrow defeat against fellow Sky Bet League One side Barnsley in Northern Group F this Tuesday evening.
Going into their final group game, David Hopkin's men knew that victory by a two-goal margin would give them progression into the knock-out stages, and hopes were raised when David Ball curled City into an eighth-minute lead with his first goal for the Bantams.
Barnsley hit back just before the half hour mark, however, when George Moncur neatly found the bottom corner from a Dani Pinillos cross.
Moncur then claimed the win for the Tykes in the second period when he finished off a flowing home move by beating Richard O'Donnell with a low drive from just inside the box.
Despite winning the match, the Tykes would finish the group contest with ten men after skipper Adam Jackson was dismissed thirteen minutes from the end for a second bookable offence.
Although Barnsley had several periods of pressure throughout the game, it could be argued that the Bantams created more in the way of clear scoring chances.
Kai Bruenker, one of six changes made by Hopkin, saw a goal disallowed for offside shortly before Moncur's match-winner, while Jack Payne struck the bar with a fierce effort from an in-direct free-kick six yards out.
The near-miss for Payne came after Barnsley 'keeper Jack Walton had been penalised for handling a back-pass from Ben Williams when the shot-stopper was forced to claw the ball off the line after mis-controlling.
Along with a repelled Ball free-kick in the first period, Walton was on hand to deny the Bantams after the break as well, saving efforts from Ball again and Payne in the second period.
Ball was one of five players to keep his place in Hopkin's starting XI from the team that began at Aldershot Town in the Emirates FA Cup at the weekend.
The attacker made the most of his retained berth in the team at Oakwell by handing the Bantams an early lead.
A forceful run from Sherwin Seedorf started the move for City, with Bruenker then feeding the ball out to Ball just inside the area.
Ball moved inside onto his left foot before curling a delightful effort into the top corner.
Moncur nearly responded for Barnsley almost straight away, but his effort from a couple of yards inside the box rolled narrowly past O'Donnell's near post.
The ball actually ended behind the City goal, leading to some in the home stands believing for a moment or two that the strike had indeed ended up in the back of the net.
Barnsley kept the pressure on in their search of a leveller, and Anthony O'Connor was required to make a vital clearance at the far post after Jacob Brown had flicked on a Ryan Hedges corner.
O'Connor had earlier also blocked an effort from inside the box by Victor Adeboyejo after the striker had been played into space by Hedges.
Barnsley's hard-working style of play and high pressing eventually reaped its rewards midway through the first period, though, when Moncur netted to equalise for the Tykes.
Pinillos' cross from the left dropped into the path of Moncur deep inside the area and the attacker left O'Donnell with no chance as he slotted the ball into the far bottom corner.
With Barnsley's tails up, Hedges fizzed the ball dangerously across the face of goal soon after following a short free-kick routine with Mike Bahre, but no-one in red could get a touch in the middle.
For all of Barnsley's efforts, though, City could have easily retaken the lead ten minutes before the interval.
Ball forced a great save out of Walton from a free-kick roughly twenty-five yards out, with the Barnsley shot-stopper having to fling himself fully to his right to tip the curling effort behind.
Hopkin's men were able to keep the ball alive from the following corner, and Daniel Devine - playing the game at right back - had a shot from inside the box blocked away by Jackson.
At the other end, Barnsley finished the half with a low drive from outside the box by Jordan Williams shortly before the interval that was held by O'Donnell.
Perhaps needing a boost in the middle of the park, City introduced substitute Lewis O'Brien for namesake Jim O'Brien in central midfield ahead of the restart.
The Bantams were forced into another change ten minutes after the break when Seedorf limped off to be replaced by Connor Wood.
Soon after, Ball - as he had done in the first period - had Walton at full stretch, this time to tip over a rising strike by the attacker from just outside the box.
City actually thought they had gone one better seconds later when they did get the better of Walton, but their celebrations for a second goal were cut short.
As the Bantams kept the pressure on from the resulting corner, Ball whipped a dangerous ball into the heart of the penalty area and Bruenker applied the finish from close range.
The German's joy was short-lived, though, as his goal was chalked off due to the linesman's offside flag.
It looked a close call, and salt was rubbed into the wounds soon after when Barnsley took the lead themselves with an eye-catching goal.
A flowing move from the hosts started with a smart flick from Hedges and ended with Moncur finishing neatly into the far bottom corner with a well-timed strike from inside the area that left O'Donnell with no chance.
Looking in the mood at this stage, Moncur then fired a shot on the turn from just outside the box narrowly wide from Barnsley's next attack.
With progress now looking unlikely given City's need to win by at least a two-goal margin, Hopkin's men could have perhaps been forgiven slightly for letting their minds wander to Saturday's league encounter at Peterborough United.
To their credit, though, they launched a commendable comeback into the game.
Nathaniel Knight-Percival headed wide from a decent position in the box following a Payne free-kick delivery minutes after Moncur's second.
There then came an extraordinary moment shortly afterwards when Walton failed to control a Ben Williams back-pass.
Walton's mis-control meant the ball was actually spinning towards his own goal following Williams' pass, until the goalkeeper intervened with his hand.
The officials deemed that Walton had just got back in time to claw the ball off the goal-line, even though there was some suggestion that it might have just crept over the line before the shot-stopper's final touch.
Nevertheless, Walton was penalised for handling Williams' back-pass, with City awarded an in-direct free-kick on the six yard line.
Payne went for goal from the set-piece, but his thunderous effort crashed against Barnsley's crossbar before bouncing away.
Payne had another chance to net five minutes later when City broke forward on the attack with Wood.
Wood's efforts to try and find Payne, who was unmarked in the middle, were blocked, but the number ten did eventually get the ball at his feet deep inside the box via Ball and Walton had to be out quickly to make a big block with his legs.
City's efforts to get back in the match were boosted further thirteen minutes from the end when Jackson was given his marching orders.
The Barnsley captain, who was booked for blocking off Seedorf in the first period, was given a second yellow card following a clash with Bruenker.
That was the signal for City to throw everything forward as Barnsley looked to see the game out.
George Miller, who replaced Bruenker shortly after his clash with Jackson, was played into space by Payne inside Barnsley's penalty area but his shot was blocked by substitute defender Will Smith.
Payne was involved again soon after when his corner delivery found O'Connor in the middle.
The Bantams skipper's initial effort from a header was blocked, with the defender then crashing over with a half-volley on the rebound.
With Miller lurking in the middle, the striker was twice close to latching onto crosses into the closing stages from Devine and then Wood.
City's last opportunity to claim a least a point from the match and take the game to penalties came in the final seconds of six added minutes.
The ball dropped to Payne just inside the area but the attacker's snapshot flashed comfortably wide.
Match action, stats and line ups from the Barnsley game can be found via our Match Centre - HERE.