St Johnstone secured seventh place in the Ladbrokes Premiership with strikes from Scott Tanser and Murray Davidson sealing a 2-0 win over Motherwell.
The Perth side extended their unbeaten run to four games and stretched their advantage over their opponents to four points with one game remaining.
After squandering five penalties this term, manager Tommy Wright trusted former Rochdale and Port Vale full-back Tanser to tuck away his first spot-kick in professional football.
The Fir Park side felt they should have had a penalty of their own before the opener but the match slipped from their grasp when Davidson struck a second for St Johnstone early in the second half.
Rangers-bound Jake Hastie and departing striker Curtis Main both featured on the Motherwell bench. A section of visiting fans barracked the young winger as he limbered up and came on for the closing 17 minutes.
Saints midfielder David Wotherspoon worked a dangerous fourth-minute free-kick but Davidson’s eight-yard header was clutched by keeper Mark Gillespie.
Minutes later home striker Chris Kane got on the end of Matty Kennedy’s near-post cross but the centre’s header flashed over the Well crossbar.
The Fir Park side forged a 20th-minute opening but Gboly Ariyibi’s well-struck effort was halted on the line by full-back Scott Tanser.
Referee Colin Steven, officiating his first top-flight match, decided it had struck the defender’s chest rather than hand. It was a controversial call and he cautioned the protesting striker for dissent.
And Saints forged ahead from the spot in the 34th minute when Tanser slipped home his penalty.
Kane had been bowled over in the box by defender Charles Dunne and the Englishman maintained his composure to net when keeper Gillespie’s gamesmanship warranted a yellow card.
On the stroke of half-time a thunderous Davidson strike was beaten out by the alert Gillespie, minutes after Well midfielder David Turnbull had tested Zander Clark with a stinging strike at the other end.
But Perth midfielder Davidson rounded off a flowing move two minutes after the break to add his name to the scoresheet, latching on to Michael O’Halloran’s cross to squeeze a 12-yard shot beyond the advancing keeper and inside the upright to double Saints’ lead.
In the closing stages the impressive Davidson was denied his second by a superb fingertip save from Gillespie which diverted a netbound shot round the post.