Motherwell progressed in the UEFA Europa League on penalties, after being pegged back from two goals up at Coleraine.
Callum Lang and Tony Watt appeared to have the Scots with one foot in the third qualifying round. But a second half penalty double from Ben Doherty took the game to extra time and eventually spot kicks.
Trevor Carson would then ultimately prove the hero, keeping all three of Coleraine’s efforts out to send the Steelmen through.
Motherwell started with aggressive attacking intent. Lang, McGinley and Watt all went close in the opening exchanges, before the deadlock was broken.
O’Donnell’s header back into the area from Watt’s blocked cross found Lang. His spin and shot was blocked at the first attempt by the ‘keeper, but he was able to fire home at the second attempt.
Declan Gallagher saw a close range chip over the goalkeeper hacked off the line as Motherwell continued to press, while the hosts went close through a McLaughlin header and a Carson volley which sailed well over.
Then, with 10 minutes left in the first half, it was two. Lang’s powerful cross from the right found Polworth, who laid into the path of Watt.
He still had work to do to sort his feet, before finding the bottom right corner of the net from 10 yards.
Motherwell went into the second half looking to put the result beyond doubt but almost immediately found themselves on the back foot.
A bemused Mark O’Hara could only look on as the referee awarded a spot kick for an apparent push in the box, allowing Doherty the chance to step up and half the deficit.
Coleraine, who eliminated Maribor in the previous round, grew in confidence and stature and kept Motherwell pinned in for large spells, before their chance came with two minutes to go.
Bevis Mugabi found himself on the wrong side of his man and hauled down Bradley as he looked to pull the trigger, resulting in another spot kick and a red card for the Ugandan.
Doherty made no mistake from 12 yards, levelling the tie and sending it to another 30 minutes.
There was precious little to separate the two in extra time and the match went to penalties to decide who would face Hapoel Be’er Sheva in the third qualifying round.
O’Hara, Watt and O’Donnell all cooly converted for Stephen Robinson’s men, with Carson diving to keep out all three Coleraine kicks and send Motherwell through.