St Mirren boss Jim Goodwin felt relief and embarrassment after his side squandered a three-goal lead and still reached the William Hill Scottish Cup quarter-finals.

Saints led 4-1 at half-time at Fir Park but Motherwell fought back for a 4-4 draw before Jermaine Hylton's penalty miss handed the visitors a 3-2 shoot-out win.

Goodwin, whose side host Kilmarnock or Aberdeen in the last eight, said: "The first half was so good and possibly could have been even better.

"We knew Motherwell had nothing to lose and would throw absolutely everything at us.

"I give them great credit. They put four up front, there was one point I didn't know what system they were playing. Stephen (Robinson) had a laugh with me because I hadn't a clue. There was two at the back, then there was three at the back then there was four up front, five up front.

READ MORE: Time running out for St Mirren fans to have their say on fan ownership

"Listen, I give all the credit to Stephen Robinson and his team for that second-half comeback, it was incredible.

"We were a little bit naive, didn't manage the game well enough, didn't do well enough in possession, gave it straight back to Motherwell and invited wave after wave of attack.

"When it goes to four-each you are fearing the worst so I have to give credit to my players at that stage because it would have been easy to think it wasn't going to be our night.

"Relief is probably the main emotion, slightly embarrassed about the second half, but the bottom line is we are in the quarter-finals."

Motherwell were missing centre-back Declan Gallagher and manager Robinson took off both Peter Hartley and Bevis Mugabi before the second half started.

"I'm so disappointed in the first-half performance, really, really poor defending," he said.

"Centre-forward gets in between our two centre-halves then we don't mark from a set-play even though we walked through it 10 times before it. That's the problem when players decide to do what they want.

READ MORE: Jim Goodwin uphappy with penalty decision in St Mirren's defeat at Livi

"We had to shake it up at half-time and the fans saw a team that was playing for the badge and wasn't going to lie down.

"The boys we brought on - Richard Tait, Mark O'Hara, Jermaine Hylton - changed the game and we deservedly got back into it and penalties is a lottery and ours weren't good enough."

Robinson hopes to have Gallagher back for Saturday's Lanarkshire derby against Hamilton but left-back Jake Carroll faces a lay-off after suffering an Achilles injury in the closing seconds of extra-time.

"We are waiting to assess him but it looks like a real serious one," Robinson said.

Read all the latest from Gazette Sport