Goals from Stevie May and Sanel Jahic eased St Johnstone past Livingston with a 2-0 win in their Scottish Cup fourth-round clash at McDiarmid Park.
The Scotland Under-21 player opened the scoring in the 24th minute with his 12th goal of the season but two fine saves from Saints keeper Alan Mannus, both from Callum Fordyce headers, kept the game level at the interval.
The Northern Irishman had another save from Marc McNulty early in the second half before Bosnia and Herzegovina defender Jahic, making his first start since joining the Perth club last month after leaving Turkish club Karabukspor, grabbed a second in the 61st minute from almost on the line.
The Championship side, however, could perhaps count themselves unlucky at the end of a decent afternoon's entertainment.
Before the match began there was a perfectly-observed minute's silence in recognition of the helicopter crash in Glasgow on Friday night.
With two of the four stands closed, there was far from a cup-tie atmosphere inside the stadium as the game got under way.
May, David Wotherspoon and Nigel Hasselbaink all had unsuccessful efforts as the home side dominated the early stages.
However, Mannus came to the rescue for the Perth club in the 15th minute when he tipped a header from Fordyce over the bar following Martin Scott's whipped-in free-kick, with the corner coming to nothing.
St Johnstone still looked the more threatening and Wotherspoon curled a free-kick from 25 yards just wide of the post.
However, the goal eventually arrived and there was no surprise that the scorer was on-form May.
He still had a bit to do when he took a pass from midfielder Murray Davidson but from 20 yards he drove a right-footed shot which sped past the flailing Livi keeper Kevin Walker.
Livi almost went two behind moments later when Wotherspoon escaped their defence but the former Hibernian player drew his left-footed drive wide of the far post.
In the 33rd minute the West Lothian side had the ball in the net through McNulty but the whistle had long gone for offside, but they came closer to levelling in the closing stages of the first half when Mannus made an identical save from another Fordyce header, this time from a Scott corner.
Mannus was proving to be a key player. He made another good stretching save at the expense of a corner in the 58th minute, this time from McNulty's powerful angled-drive, and the home side held out again.
There was a feeling that Livi would pay for their missed chances and just after the hour mark the cup-tie was all but over when Wotherspoon's free-kick from wide on the left by-passed Walker, with Jahic on hand to bundle it over the line from inches out.
In the 66th minute, with the visitors looking forlorn, Walker had to rush from his goal to prevent May scoring his second.
As Livingston left gaps trying to get back into the match, Hasselbaink selfishly shot over the bar from inside the box when he had options either side.
With eight minutes remaining Fordyce hammered a loose ball wide of the target from 12 yards after Saints had struggled to defend another corner, and McNulty watched in agony as an attempt by him trickled past the post with Mannus beaten.
With three minutes remaining Saints substitute Rory Fallon, on for Hasselbaink, crashed a header off the bar from a Dave Mackay cross before Mensing also hit woodwork with a looping header as Livingston kept battling to the end.