Ayr launched their defence of the BT Premiership title with a last-ditch win in a scintillating game that augurs well for the quality of entertainment in the months ahead.
The hosts opened the scoring when Mark Hare crashed over and Chris Laidlaw converted, extending their lead when Johnny Adams bagged try No 2, Laidlaw again converting.
Ayr cut the deficit when Frazier Climo dotted down for a self-converted score just before the break, and struck early in the second period with a Blair MacPherson try. However, the hosts struck back with a converted Cal Davies score.
Climo bagged his second touchdown then David Armstrong claimed the bonus point score for the visitors and Scott Lyle converted to establish a three-point lead.
But once again, Boroughmuir retaliated, Hare darting in for his second converted try.
A penalty from Lyle sparked a final effort by Ayr, who snatched the victory when Climo was perfectly placed to clip over a drop goal with the final play.