The Dumfries men were in command for long stages and the only surprise was that it took them so long to find the net. Dobbie set the tone after only seven minutes with a header that was only inches wide from a Danny Carmichael cross.
Carmichael then had a shot diverted past by Robbie Crawford when he looked certain to score before Lyndon Dykes had the ball in the net only to be flagged offside.
It took Ayr 35 minutes to create a serious chance but Farid El Alagui’s header from a Paul Cairney cross was an easy save for Lee Robinson. Gary Harkins replaced the injured El Alagui two minutes before the interval and immediately tried to inject some attacking threat into an Ayr attack.
Skipper Nicky Devlin tried to drive the home men on with some thrusting runs but the pattern was largely the same.
It took the combined efforts of Daryll Meggatt and Greg Fleming to deny Dobbie before the striker flashed another drive just wide.
The writing was on the wall and Dobbie at last got his reward with 20 minutes to go when he volleyed from 15 yards.
Dobbie then put the finishing seal on victory when he held off a couple of challenges to drive home the clinching second goal.