Jack Dunn’s hat-trick helped Morecambe past Rotherham after extra time in an EFL Cup first-round thriller.
Cole Stockton’s curled finish put League Two side ahead.
Greg Halford’s penalty equalised, only for Dunn to restore Morecambe’s lead before the Championship side struck twice in two minutes through Jerry Yates and Anthony Forde to make it 3-2.
Dunn’s second forced the tie to extra time, when he scored again and Kevin Ellison netted before Yates’ reply.
Forward Dunn, on loan from Liverpool, scored from the penalty spot two minutes into injury time after he was fouled by Richard Wood in the box, giving Morecambe renewed hope of completing an upset.
Former Rotherham winger Ellison fired the Shrimps ahead for only the second time in the game in the 113th minute before then setting Dunn up for his treble with two minutes to go to make it 5-3.
There was still time for Rotherham to score again, with Yates giving Jim Bentley’s Morecambe reason to be nervous when he struck in the final minute of extra time.
Rotherham manager Alan Stubbs: “First of all it was obviously disappointing and secondly the manner of the goals is not good enough.
“They were goals that at this level we shouldn’t be conceding. It is an area that we are looking to make stronger. You look at tonight and people will say you can see why.
“As a team we need to do better than what we did, that was the same on Saturday. We should be doing better.”
Morecambe manager Jim Bentley: “It was excellent, credit where credit is due, I thought the players were absolutely magnificent against a strong team away from home.
“I am emotionally drained, it was a long night, but the players were fantastic and they deserve every pat on the back that they get tonight. I am very proud of them, we deserved it.”