James McFadden’s 39th minute opener deservedly gave the McDiarmid Park side the upper hand at half-time and they doubled the advantage after the interval when Michael O’Halloran made up for an incredible miss from close range.
Jake Jervis pulled one back immediately on 75 minutes for the Highlanders, who pressed strongly in search of an equaliser, but time was against them and the hosts held on.
Victory will give Saints heart ahead of the Scottish Cup tie between the two sides in seven days’ time, but the way County put their hosts under considerable pressure late on will have also given them belief for the rematch.
McFadden was pivotal to most of St Johnstone’s positive play in what was otherwise an uneventful opening spell.
Chris Millar sent in the first shot on target after 10 minutes before Saints threatened again moments later. A magnificent left-wing cross from Simon Lappin put the County defence under pressure, but Jamie Reckord did well to header over with Brian Graham lurking dangerously behind.
Brown was beaten midway through the half when McFadden’s corner bounced off two players at the edge of the six-yard box, but Graham Carey was in the right place at the right time to hack the ball off the line.
With County keeping possession comfortably enough at times but failing to create anything in the final third, it seemed only a matter of time before Saints found the breakthrough at the other end – and it came five minutes before the interval.
Lee Croft’s corner picked out McFadden, who worked enough space to fire in a low shot from 12 yards out on the angle. A deflection off Richard Brittain helped carry the ball past Carey on the line.
There was little change to the pattern of play in the early stages of the second period, although County displayed slightly more ambition.
One free-kick just evaded the in-rushing Paul Quinn, but County manager Jim McIntyre then decided to bring on Joe Cardle and Filip Kiss in the 59th minute in a bid to spark his team into life.
Croft sprinted to reach McFadden’s pass on the bye-line and chipped a tempting ball into the goalmouth. O’Halloran should have scored but somehow managed to head against a post from barely a yard out.
The former Bolton man made amends eight minutes later, however.
County were busy claiming for a penalty following Millar’s challenge on Tony Dingwall when the hosts raced up the field and O’Halloran blasted his finish past Brown from just inside the area.
The Staggies gave themselves hope, however, as they suddenly found their attacking verve and pulled a goal back two minutes later.
Cardle, who had injected pace and trickery into the visiting side, swung in a dangerous diagonal cross from the left that was nodded down by Scott Boyd and Jervis bundled the loose ball in from four yards out.
St Johnstone were suddenly clinging to their slender advantage, despite having been cruising at 2-0 up, but they were able to hold on.