Lewis Vaughan scored for the 10th game in a row but Raith Rovers manager Barry Smith stressed the success of the League One pacesetters is all down to team work.
The Kirkcaldy side opened a four-point lead at the top after their 2-1 comeback victory over Ayr United, who have now failed to win in their last three games.
Raith now head to Hampden on Saturday to take on Queen’s Park but have big worries over skipper Kyle Benedictus who was taken to hospital after hobbling off after only 19 minutes.
Vaughan curled a free-kick against the post before former Aberdeen striker Lawrence Shankland fired Ayr ahead on his debut right on half-time.
Vaughan has better luck five minutes after the interval when he drove a 25-yard free-kick past hesitant Ayr keeper Jordan Hart who looked badly at fault.
Hart was also found wanting when Jason Thomson fired home what proved to be the match winner with half an hour to go.
Ayr spurned chances to equalise but were killed off when their skipper Chris Higgins was harshly sent off for a second booking with six minutes to go.
Smith claimed: “Lewis is always capable of scoring free-kicks like that so we just ask him to make sure he hits the target.
“Lewis is doing excellent at the moment and we want him to keep getting better.
“It’s great to have that weapon in your team but overall our team spirit and commitment was excellent in what was a very tough game.
“I think the boys knew that in the first-half Ayr were the better team but after the interval we came out and did what we are good at.
“The players showed a tremendous amount of desire, commitment and team spirit to get that result.
“We had to mix and match at the end but, all in all, we are very happy to beat a team like Ayr on our home ground.”
Goal hero Thomson added: “A goal has been a while coming for me but I can’t complain about how it goes into the net, especially against Ayr.
“It’s a big three points for us so early in the season. We knew we hadn’t played well in the first half and the manager let us know that but the game was still there to be won.”