Lewis Ferguson grabbed a spectacular stoppage-time winner as Aberdeen beat Livingston 3-2 at Pittodrie on Tuesday night.
Niall McGinn's early opener was overturned by goals from Scott Pittman and Jack McMillan before the break but Sam Cosgrove equalised in 57 minutes.
Aberdeen missed some good chances before Ferguson found the net in added time to take Derek McInnes' side above Gary Holt's team.
In the night's other game, Ladbrokes League 2 leaders Edinburgh City stay two points clear of Peterhead at the top of the table after a 1-1 draw at Ainslie Park.
Jason Brown gave the Blue Toon the lead but top scorer Blair Henderson equalised for City and they earned a point despite a red card for Andy Black.
Aberdeen 3-2 Livingston - Highlights on SPFL YouTube channel