Ayr moved three points above Stranraer in the table following a 1-0 victory at Stair Park.
David Winters' fifth goal in all competitions separated the two struggling sides.
Ayr went into the game ahead of the home side on goal difference but had not won in their last five games.
Stranraer started brightly but Craig Malcolm's early volley went narrowly wide.
At the other end Kyle McAusland could only head straight at David Mitchell.
Winters struck seven minutes before half time with a low drive into the far corner from the right side of the penalty area.
The second half was a scrappy affair and neither side offered much goal threat as Ayr hung on for their first win since November - a 2-1 win against the same opponents.