The away side made a bright start to the game, but it was Ayr who had the first opportunity of the game on five minutes. Michael Donald smashed the ball past the goalkeeper, but he could only hit the post.
The home side continued to worry the Rangers defence as they pushed forward in the early stages.
Rangers got themselves back into the game and came close on 13 minutes through Nicky Law, but his half-volley went just over the bar.
Rangers showed some neat build-up play on the 20-minute mark, resulting in a strong 25-yard effort from Lee McCulloch, which was dealt well by the goalkeeper.
Lee Wallace tested the goalkeeper on 25 minutes with a low free kick, but the ball was cleared away.
The visitors began to maintain a period of sustained pressure and pushed Ayr back. Jon Daly had a huge chance just before half time from a corner, but the forward could not adjust his body in time to apply the finish.