Peterhead FC took a leap towards promotion by rising to second place in League 1 after defeating Ayr United away from home.
Blue Toon manager Jim McInally was delighted.
The result meant that Peterhead leapfrogged their opponents in the table.
Shane Sutherland’s sumptuous free kick gave the Blue Toon the lead midway through the first half at Somerset Park.
He went close to netting again almost immediately and Ayr made the most of the reprieve by hauling themselves level in the 25th minute.
Ex-Motherwell youngster Craig Moore rifled a shot from inside the penalty area beyond Peterhead keeper Graeme Smith.
With their lethal from two, the Blue Toon always carried a threat and they restored their advantage four minutes before the break.
Jamie Adams lost possession for the hosts in midfield and when the ball eventually landed at the feet of McAllister, who drove a low shot from a tight angle into the corner of the net.
Scott Ross saw red in stoppage time after the official Alan Muir deemed his challenge on Alan Forrest worthy of a second yellow.
Coach McInally said: “It was a right good game.
“The pitch meant there was not a lot of football played but it was two teams having a go, with a lot of tough tackling and plenty of action.
“I actually felt we should have buried Ayr in the first half and we were also denied a stonewall penalty.
“Shane scored a great goal and was terrific for us again, as was Simon Ferry, but I don’t really like to single players out when all the lads put in a great shift and showed great attitude.
“I felt the referee’s decision to send off Scott Ross was absolutely shocking.
“You know, I don’t always stick up for Scott when I think he has done wrong, but he made a great challenge and somehow got a second yellow.
“But I don’t want to spoil our day.
“To go second is remarkable considering where we were a few months.”