A 94th minute Ryan Hedges goal saw Morecambe suffer an agonising defeat in this thrilling Carabao Cup tie at Oakwell.
Hedges scored a fine winner to give Barnsley victory just as the game looked set fr extra time after a spirited Morecambe comeback after conceding two early goals.
The Shrimps got off to the worst possible start when they went a goal down after just two minutes. Ike Ugbo cut open the Morecambe defence all too easily with a through ball for Tom Bradshaw who produced a low shot to beat Dan Nizic low to his right.
The Shrimps were undone a second time on 22 minutes with Ugbo again the main tormentor as he beat Sam Lavelle down the right and put in a cross that ended up over the Morecambe line with Mitchell Lund getting the last touch to deflect the ball into his own net.
The Shrimps always looked lively going forward and deserved their equaliser in first half injury time, Michael Rose swung over a left wing corner which Barnsley failed to clear convincingly and Lavelle was on hand to mark his debut with a fine half volley that found its way into the top right hand corner of the Barnsley goal.
The Shrimps’ joy was short lived however as Barnsley scored a third just 25 seconds after the restart. Adam Hammill crossed from the left and Bradshaw beat Nizic to the ball to see his effort end up over the line.
To their credit Morecambe bounced back just two minutes later with a penalty. The excellent Oliver was bundled over in the box and Michael Rose made no mistake from the spot to reduce the deficit.
The Shrimps then played some fine flowing football with Davies forced to save smartly from Oliver and Kevin Ellison before Morecambe levelled the scores eight minutes from time when Oliver headed a Garry Thompson cross over the line from close range.
With time running out Rose forced Davies into an excellent save from a well struck free kick from the edge of the box but with the game looking set for extra time Hedges curled a superb effort past Nizic from the edge of the box to give the Championship side victory at the death.
Barnsley: Davies, Pearson, MacDonald, Pinnock, Yiadom, Potts (rep Hedges 89), Moncur, Williams (rep Mowatt 89). Hammill, Ugbo (rep Payne 77), Bradshw. Subs not used: Townsend, McCarthy, Jackson, Mallan.
Morecambe: Nizic, McGowan, Lund (rep Ellison 49), Kenyon, Lavelle, Brough, Fleming, Rose, Campbell (rep Thompson 69), Turner (rep Deakin 73), Oliver. Subs not used: Roche, Conlan, Wildig, Brownsword.
Ref: D Bond.