Liam Donnelly was the hero as he sent Motherwell into the Scottish Cup fifth round, but his side needed 120 minutes to see off Championship side Greenock Morton.
Morton took the lead on the stroke of half-time in extra-time as Gozie Ugwu set up Robbie Muirhead and he cut in from the right before ripping a shot into the bottom left corner.
But a push on Ross Tierney gave Kevin Van Veen a spot-kick, which the Dutch striker blasted past Jack Hamilton in 108 minutes.
But Donnelly ripped a shot high into the top left corner to win it for Well, after Tierney's shot was blocked on the line.