Motherwell dug deep to come from behind and progress after extra time against Greenock Morton.
After a goalless 90 minutes, Robbie Muirhead threatened to cause a shock for the visitors with a strike on the counter on the stroke of half-time of the first period.
But Kevin van Veen’s penalty and Liam Donnelly’s wonder strike at the death ensured progression to the last 16.
Graham Alexander made two changes from the side that lost to Ross County. In the absence of Bevis Mugabi, Jake Carroll came in to the central defence to partner Sondre Solholm.
Up front, Connor Shields was given the opportunity to lead the ‘Well attack with Van Veen dropping to the bench.
Shields had an early half chance but with his back to goal, he failed to make good contact with Jordan Roberts’ cross from the right side of the penalty area.
The former Queen of the South striker then produced a terrific burst of speed to race away from former Fir Park defender Brian McLean, but from a tight angle, Shields fired low and saw his effort turned round the post by goalkeeper Hamilton.
From the resultant corner, Carroll’s downward header gave the goalkeeper his comfortable first save of the match.
The former Hearts’ ‘keeper was forced into a better save after 15 minutes when a Sean Goss free was only cleared to Barry Maguire at the edge of the box and his fine drive was beaten away by Hamilton.
As Motherwell tried to pick up the pace, Goss tried his luck from fully 35 yards but his powerful left foot was palmed away by the Morton ‘keeper.
After that period of pressure from ‘Well, the Championship side settled into the pace of the game and comfortably dealt with the home threat.
Most of the play was contained to the midfield where Maguire was dominant. But when the Fir Park men broke forward, notably through the trickery and speed of Roberts and Kaiyne Woolery the ball in the final third was poor and failed to find the rather isolated Shields.
Although Morton contested well in the first half, it took them until the final minute of the first half to produce a shot on goal.
And while Gavin Reilly’s angled shot from 12 yards was straight at Liam Kelly, it posted a warning that the Steelmen would have to raise their game in the second half and impress the ‘Well fans.
As the hour mark approached and most of play continued around the home goal, manager Alexander acknowledged a change in personnel was required.
As Van Veen was just about to replace Woolery, Shields’ close-range header brought a fine reflex save from Hamilton.
It didn’t take long for Van Veen to make his presence felt and within two minutes his clever footwork had worked an opening at the edge of the box but his left foot shot was straight at the ‘keeper.
A couple of minutes later, the Dutch striker produced a similar run across the box only to fire his shot over the crossbar but at least he was getting the home fans on their feet.
A Goss drive across the six-yard box found no takers in claret and amber as the ‘Well fans frustrations started to grow.
With 15 minutes remaining, the tireless running Shields made way for recent acquisition Ross Tierney to make his debut.
It was still end-to-end stuff as Morton continued to push towards Kelly’s goal in search of a shock winner.
Four minutes from time van Veen was denied what would have been the winning goal. Advancing on Hamilton’s goal from an angle the striker’s low finish was destined for the far corner of the net until the ‘keeper’s outstretched leg diverted the ball beyond the post.
A minute later, Donnelly’s thumping drive from 25 yards was smothered by the Morton ‘keeper as the Premiership side pushed to prevent the tie going into extra time.
Despite applying an urgency missing from the previous 80 minutes, Motherwell failed to kill off a determined Morton as the boos from the home fans signalled the end of regulation time.
The ‘Well boss no doubt urged his men to begin extra-time maintaining the pressure on the ‘Ton goal. But with Imrie’s side reorganised at the back, the game settled into its familiar pattern with the away side looking as likely to find the opening goal.
Both ‘Well substitutes – Van Veen and especially Tierney – looked determined to influence things but it was Morton sub Muirhead who had the greatest impact on the game when he broke the deadlock just before the end of the first period of extra-time.
The former Kilmarnock and Dundee United striker chased a hopeful long ball upfield before dragging the ball into the box and whipping an angled shot beyond the diving Kelly to put Morton in the driving seat.
Facing the Cooper Stand for the final 15 minutes, Alexander made a double change bringing on Amaluzor and Slattery.
The former Southampton man was involved after only three minutes when his ball into the box found Tierney eight yards in front of goal.
When McLean thundered into the back of the Irishman, referee Nick Walsh had no hesitation in pointing to the penalty spot.
Despite protests from the Morton players, Van Veen confidently hammered home the spot kick for his eighth goal of the season and raise ‘Well’s hopes of finding a winner.
And it almost arrived three minutes from the end when van Veen latched on to McGinley’s ball down the left channel but after cutting inside his side foot finish was palmed away by Hamilton’s raised glove.
Two minutes later, Tierney was then denied a memorable debut goal when his header was cleared off the goal line.
However, the ball landed at the feet of Donnelly through Goss and, from the edge of the box, his stunning drive found the top corner of the net for a wonderful winning goal.
Motherwell: Kelly, O’Donnell, Solholm, Carroll, McGinley, Donnelly, Maguire (Tierney), Goss, Woolery (Slattery), Roberts (Amaluzor), Shields (Van Veen).
Subs: Fox, Ojala, O’Connor, Shaw, Cornelius.