St Johnstone remain in with a shout of retaining their League Cup trophy.
The Perth Saints were pushed all the way by Arbroath on Sunday afternoon but eventually advanced on spot-kicks.
Glenn Middleton had cancelled out Joel Nouble’s first-half goal to send the tie into extra-time.
But the hosts then nudged back in front when defender Thomas O’Brien rocketed high into the net.
Saints showed character and weren’t going down without a fight. Jamie McCart’s header levelled at 2-2.
That resulted in penalties and Zander Clark was brought on specifically, replacing Elliott Parish.
Ali McCann powered in the deciding effort from 12 yards to confirm the quarter final ticket.
There can’t be many teams who have swapped taking on Galatasaray for the scenic surroundings of Gayfield Park in the same month.
But you can be sure manager Callum Davidson would be treating this Arbroath adventure with the respect it deserved.
It was, after all, the start of the League Cup defence and fans would be dreaming of celebrating even more silverware.
The buzz surrounding the Perth club was again reflected in the backing given from the terraces. This was a vocal away support.
Arbroath, specifically winger Scott Stewart, did try to quieten them down on six minutes when he weaved in from the right flank.
His shot was deflected wide of the mark and behind for a corner, which eventually came to nothing.
Up the other end and Saints would always have a threat with the craft and pace of Middleton. So it proved on nine minutes.
The winger on loan from Rangers cut inside onto his trusty left foot and suddenly had created a yard for a pop at goal.
It looked promising but an Arbroath boot was able to turn the ball wide of the mark.
Davidson had named a strong squad and soon McCann was lining-up his angles from distance.
The energetic midfielder’s right-footed long-ranger required a touch over the bar from home goalkeeper Derek Gaston.
Much like the friendly between the sides in July, the hosts were making life difficult. They would take the lead in the 31st minute.
Nicky Low’s whipped in corner was flicked on at the front post and waiting to tap over the line from close range was striker Nouble.
Callum Hendry attempted to respond as half-time approached but his first-time hit from the edge of the box was straight at Gaston.
And then Middleton’s lofted delivery hung in the air and attracted the attention of Stevie May, who could only nod wide.
The same 11 were sent back out for the start of the second half but again Saints were struggling to carve out a clear-cut opening.
Arbroath actually looked the likelier to extend their lead and had a couple of sights of goal before the leveller did arrive.
Reece Devine’s perseverance in the box paid off when he was taken down by Gaston just shy of the hour mark.
Skipper Kerr, reliable from 12 yards in recent times, had his spot-kick saved but Middleton followed up to guide over the line.
Fresh legs were introduced with Cammy Ballantyne on for May while Callum Booth swapped in for Devine.
Saints were inches from nudging back in front on 83 minutes after neat link-up between Hendry and Middleton.
The latter’s crisp drive hit the underside of the crossbar and bounced away from danger. He was then replaced by Michael O’Halloran.
Arbroath did have a great chance of a winner not long after when Nouble nodded back across goal for Michael McKenna.
He leaned back and sent his effort from a promising position well over the bar. And so it was extra time.
Saints were sleeping early doors and Parish needed to be alert to beat away substitute Luke Donnelly’s strike.
But the Perth goalkeeper could do nothing to stop O’Brien from rifling high into the net with 93 minutes on the clock.
Visiting defenders lost the first header from a deep corner and then nobody was picking up the big centre-half, who finished very well.
At this point the men from Perth appeared to be tiring but on the stroke of half-time of extra-time, it was level again at 2-2.
That was thanks to McCart’s towering header from Liam Craig’s corner.
The away support thought Ballantyne had won the game with a curling late long-ranger but his impressive effort had drifted inches wide.
Penalties would decide who advanced. Ricky Little and Dale Hilson both missed for Arbroath but Booth and Kerr would follow suit.
When Bobby Linn hit the post, it was down to McCann to wrap up the tie. And that he did.