Brechin boss Ray McKinnon was left fuming at the performance of referee Gavin Duncan as his side suffered their first league defeat of the season against Ayr United.
The award of two penalties to the Honest Men and the sending-off of City midfielder Greg Cameron, left McKinnon aggrieved.
There were no goals in an evenly-contested first half. Bobby Barr went closest to scoring for Brechin with one drive which went wide and another which was saved by David Hutton.
Brechin took the lead on 49 minutes. Andy Jackson broke on the left and his cutback was fired high into the net by Alan Trouten.
Minutes later, a Martin Campbell header was judged to have hit a Brechin hand and three minutes of confusion followed as the referee consulted both his assistants in a bid to identify the alleged culprit. Cameron was booked for dissent and Scott McLaughlin scored from the spot.
Brechin went back in front on the hour-mark. Jamie Masson took a pass 25 yards out and sent a glorious chip into the top corner.
Cameron then fouled Dale Shirkie to collect a second booking, leaving Brechin to face the rest of the match with 10 men.
Brechin held out until 73 minutes when Craig Beattie bundled a corner home on the near post.
More defensive heroics followed for the home side until 87 minutes when the referee awarded another penalty for a handball by Jamie McCormack and McLaughlin again made no mistake.
Two minutes into added time, Beattie turned his marker and slotted home a fourth for Ayr.
McKinnon said: “I was disappointed to give a goal away after taking the lead.
“We took the lead again, then Greg got himself sent off which changed the game. The decision gave Ayr the impetus and something to play for.
“I am disappointed in the referee. He has admitted to me that he made a mistake at the first penalty.
“He decided it was handball, but if you do not know who handled how can you give a penalty?
“The referee was quick enough to give another penalty later, although Jamie McCormack had turned his back when the ball hit him.
“He was also desperate to send Greg Cameron off and couldn’t get his cards out quick enough.
“Greg’s first booking was for dissent, but I blame the referee for that as well as he was only pointing out that it couldn’t be a penalty if the offender couldn’t be identified.”