Substitute Nicky Clark headed the winner as Scottish League One leaders Rangers came from two goals down to beat Brechin City at Glebe Park.
Graham Hay's header and Jonny Brown's free-kick put the hosts in command before Jon Daly pulled one back.
Alan Trouten's strike sent Brechin in 3-1 up at the break.
Bilel Mohsni and Nicky Law fired home to level the match and Clark nodded in late on to maintain Rangers' winning start to the league season.
Ally McCoist's side have maximum points from their opening nine matches in the division while Brechin slip to second bottom.
However, Brechin had looked on course to end Rangers' record after three first-half goals.
Captain Hay rose unmarked to head Trouten's corner past Cammy Bell and Brown's free-kick from the edge of the box doubled the hosts' advantage.
Andy Little headed narrowly wide for the visitors but Daly did halve the deficit when he raced on to a long ball and slotted past Graeme Smith.
Rangers could have levelled when Ian Black's free-kick was fumbled by Smith and fell kindly for Lee McCulloch but the skipper fired wide.
And Brechin were soon celebrating again as Trouten pounced on a loose ball and drilled it past Bell.
Smith denied Little early in the second half but Mohsni converted following another free-kick delivery from Black.
The leveller soon arrived with Law's cross evading the goalkeeper and finding its way into the net.
Clark had replaced Robbie Crawford at the interval and the striker met fellow sub David Templeton's cross to put Rangers ahead for the first time.
And there was more disappointment for the hosts when Trouten was dismissed in injury time for picking up a second yellow card.
- 01 Smith Booked
- 02 McLean Booked (Jackson - 86' )
- 03 Brown
- 05 Moyes
- 04 Hay
- 06 McLaughlan
- 08 Anderson Booked (Molloy - 76' )
- 07 Trouten Dismissed after an earlier booking
- 11 Ryan (Barr - 69' )
- 09 Jackson
- 10 Petrie
- 12 Robb
- 14 Jackson
- 15 Molloy
- 16 Donnelly
- 17 Barr
- 18 Cameron
- 21 Nelson
- 01 Bell
- 02 Foster Booked
- 03 Smith Booked
- 10 MacLeod (Templeton - 80' )
- 05 Mohsni Booked
- 06 McCulloch Booked
- 04 Crawford (Clark - 45' )
- 08 Black Booked
- 09 Daly Booked
- 07 Little (Hutton - 86' )
- 11 Law Booked
- 12 Templeton
- 14 Clark
- 15 Faure
- 16 Simonsen
- 17 Sanchez Cribari
- 18 Hutton
- 19 Aird
Ref: Craig Charleston