Rangers blew the chance to move 22 points clear at the top of the Irn-Bru Third Division after being held to a last-gasp draw by Montrose at Ibrox.
An own-goal from John Crawford had looked enough to secure the win in the only match to survive the weather conditions in Scottish football's bottom tier.
But the final say went to David Gray when he lashed home with 89 minutes on the clock to claim a share of the points for the visitors.
Rangers boss Ally McCoist made one change from the side who won at Peterhead last week, with Dean Shiels drafted into the starting line-up and Ian Black dropped to the bench.
Goalkeeper John Gibson and Martin Boyle both started for the visitors after joining on loan from Dundee.
Montrose looked lively early on and had a crack at goal when Boyle's cross found Scott Johnston unmarked but his effort was claimed by goalkeeper Neil Alexander.
At the other end, Francisco Sandaza's cut-back was collected by Shiels but his shot deflected wide of the near post and Rangers failed to capitalise on the resulting corner.
The Spaniard was the provider again, this time for Andy Little, but Gibson did well to smother at the feet of the Northern Irishman who took too long to unleash the shot.
Montrose still looked capable of causing problems and Leighton McIntosh was not too far away with a bullet header that fell across goal and wide.
There was concern for Rangers when Lewis Macleod went to ground following what appeared to be an innocuous challenge from Paul Watson.
The youngster left the pitch on a stretcher and was replaced by Black after 29 minutes.
The former Hearts man set up Templeton in front of goal but the winger's header was just off-target.
The breakthrough finally came on the stroke of half-time when Templeton unleashed a left-foot shot that appeared to be directed into the back of his own net by Crawford under pressure from Little.
Rangers could have doubled their advantage shortly after the break when Lee Wallace's free-kick was met by Little and he fired just over the crossbar.
Ibrox then fell silent after 54 minutes for a piper's lament in memory of the supporter who lost his life at the last home game.
There was another change for the hosts after an hour when Chris Hegarty, who appeared to be struggling, made way for the introduction of Sebastien Faure.
Shiels then saw an acrobatic effort blocked in the packed goalmouth as Rangers tried to add to their slender advantage.
It proved to be the Northern Irishman's last real contribution when he was swapped for Barrie McKay with 15 minutes to go.
Gibson came to the rescue for Montrose twice in quick succession, producing an excellent save to deny Sandaza, before punching a McKay effort to safety.
Black's free-kick then crashed off the post, before Garry Wood passed up a great chance for a late leveller when he blasted over.
The honours went to substitute Gray instead who stunned the majority of the 46,273 crowd with a 25-yard strike that found the back of the net via the underside of the crossbar with a minute to go.
Why are you making commenting on The Herald only available to subscribers?
It should have been a safe space for informed debate, somewhere for readers to discuss issues around the biggest stories of the day, but all too often the below the line comments on most websites have become bogged down by off-topic discussions and abuse.
heraldscotland.com is tackling this problem by allowing only subscribers to comment.
We are doing this to improve the experience for our loyal readers and we believe it will reduce the ability of trolls and troublemakers, who occasionally find their way onto our site, to abuse our journalists and readers. We also hope it will help the comments section fulfil its promise as a part of Scotland's conversation with itself.
We are lucky at The Herald. We are read by an informed, educated readership who can add their knowledge and insights to our stories.
That is invaluable.
We are making the subscriber-only change to support our valued readers, who tell us they don't want the site cluttered up with irrelevant comments, untruths and abuse.
In the past, the journalist’s job was to collect and distribute information to the audience. Technology means that readers can shape a discussion. We look forward to hearing from you on heraldscotland.com
Comments & Moderation
Readers’ comments: You are personally liable for the content of any comments you upload to this website, so please act responsibly. We do not pre-moderate or monitor readers’ comments appearing on our websites, but we do post-moderate in response to complaints we receive or otherwise when a potential problem comes to our attention. You can make a complaint by using the ‘report this post’ link . We may then apply our discretion under the user terms to amend or delete comments.
Post moderation is undertaken full-time 9am-6pm on weekdays, and on a part-time basis outwith those hours.
Read the rules hereComments are closed on this article