Aberdeen recorded their first win against Rangers at Ibrox since 1991 with a 2-1 success to confirm second spot in the Scottish Premiership.
Graeme Shinnie’s third goal of the season gave the Dons an early lead and they could easily have been two or three ahead by the interval.
Ryan Christie, the on-loan Celtic midfielder, headed home a second seven minutes after the break but Martyn Waghorn reduced the deficit soon after.
Jayden Stockley was sent off in the final minute but the Dons held on for the victory that confirmed a third successive runners-up finish in the Scottish Premiership.
Derek McInnes had hinted he might rest players with the Scottish Cup final fast approaching but named his strongest possible team with Ryan Christie stepping in for the suspended Jonny Hayes and top scorer Adam Rooney reinstated at the expense of Jayden Stockley.
Rangers, by contrast, were a bit more experimental with 18-year-old central defender Aidan Wilson making his debut.
The Dons made the perfect start by taking the lead after only nine minutes.
Rangers full back James Tavernier squandered possession allowing Shinnie to dart past Jon Toral before coolly stroking the ball beyond the advancing Wes Foderingham.
The Dons were claiming for a penalty in the 16th minute when Christie fell to ground following a challenge from Wilson but referee John Beaton was unmoved.
Rangers were forced into an early change when Lee Hodson hobbled off and was replaced by Myles Beerman after 17 minutes. They almost levelled a minute later when Kenny Miller charged down a Mark Reynolds clearance but Joe Garner curled wide with only the goalkeeper to beat.
Rangers had another great opportunity 10 minutes before the break when Miller released Josh Windass with an excellent chipped pass but the midfielder’s touch let him down.
The Reds were guilty of passing up an even better chance soon after when Andrew Considine nodded an Anthony O’Connor cross to the unmarked Ash Taylor but he fired straight at Foderingham from six yards out.
Niall McGinn almost produced a superb second for the Dons on the stroke of half-time with a well-struck free kick from 30 yards that was tipped over by Foderingham.
The Dons should have netted a second within two minutes of the restart when Rangers were caught trying to play the ball out from the back but the overworked Foderingham foiled McGinn before making a smart save to deny Rooney.
The Ibrox side were all over the place defensively and it was only a matter of time before the Dons added to their tally.
The goal arrived after 52 minutes when Rooney headed a McGinn cross towards Christie who nodded home from five yards.
But if the Aberdeen supporters thought that was game over, they were mistaken as the hosts pulled one back just after the hour mark with Windass releasing substitute Martyn Waghorn who chipped the ball over Lewis and into the net.
Rangers had another penalty claim turned down when Barrie McKay tumbled to the ground under pressure from Shay Logan, sparking a heated discussion between McInnes and Caixinha on the touchline.
The Dons finished the match with 10 men when substitute Jayden Stockley was sent off for a second bookable offence in the final minute but the Dons held on for a deserved win.