A bizarre own goal by Ayr United full-back Mick Dunlop gave Stranraer an unlikely win and allowed them to steal a march ahead of next Saturday's rematch in the Scottish Cup.
The goal came in the 69th minute when Stranraer wing-back Lee Sharp flighted over a left-wing pass which Dunlop unaccountably dived full length to head past his own keeper Jon Hillcoat.
With the wind and driving rain at their backs Stranraer had the better first-half chances and Hillcoat did well to parry a 35-yard free-kick from Derek Wingate.
The Ayr goal led a charmed life just before the interval when a wind-assisted corner from Kevin Finlayson looked like drifting in until Stuart McGrady popped up on the line to head clear.
With the elements at their back after the interval Ayr powered forward in search of the breakthrough but they were stunned when Stranraer struck totally against the run of play.
Sharp's cross looked harmless until Dunlop took off to beat his own keeper and head the ball into the bottom corner.
Desperate Ayr pushed forward in search of an equaliser and Gareth Wardlaw twice went close with headers while Scott Chaplain's free-kick produced a super save from on-loan Celtic keeper Michael McGovern.