Last updated on .From the section Scottish Premiership

Rangers relinquished top spot in the Scottish Premiership after Scott McKenna's goal earned Aberdeen their second win at Ibrox in 27 years on a night when both finished with 10 men.

McKenna struck after seven minutes, but Aberdeen were on the defensive after Sam Cosgrove received a second booking.

Rangers laboured and Alfredo Morelos was dismissed when a stray arm on Graeme Shinnie led to a second yellow.

The defeat saw Kilmarnock replace Steven Gerrard's side at the top.

But the Ibrox club stay ahead of Celtic on goal difference.

Aberdeen, meanwhile, have avoided defeat against the Ibrox side in four consecutive meetings, and this win was built on resolve and perseverance.

McKenna's early strike established a foundation to build on, and the visitors were sufficiently organised to thwart Rangers' attack.

Morelos sent a header wide in the first half and another over the bar, while Aberdeen goalkeeper Joe Lewis saved from Glenn Middleton.

But once Morelos received his third red card of the season - and his second against Aberdeen - the home side lacked a cutting edge.

McKenna marshals Aberdeen

McKenna's first intervention in the game was to show sharp reflexes and composure to steer the ball high into the net after Niall McGinn's free-kick was headed down by Cosgrove.

The defender then led his side to only their second win at Ibrox in 27 years with a display of calm authority at the back. He was unflustered, even when a late Kyle Lafferty challenge left him grounded and needing treatment deep into the second half.

Rangers will rue the indiscipline of Morelos, but also a lack of purpose to their play that meant they failed to impose themselves on Aberdeen even after Cosgrove saw red in the first-half following a second yellow card for catching Connor Goldson.

Aberdeen were dogged, with McKenna at the heart of their rearguard action. It wasn't until the 24th minute that Rangers came close to troubling Lewis, as Morelos nipped in at the front post and sent a header into the side netting.

Lewis had to look lively to tip away Middleton's drilled effort, but otherwise Aberdeen were generally sound at the back. Even when Lafferty came on at half-time, closely followed by Eros Grezda, Aberdeen's defence stood strong.

Lewis produced a double save to deny Lafferty and Ryan Jack, then Morelos blasted over before being sent off three minutes later for landing an arm on Shinnie.

With the game drifting to a close, and Rangers becoming desperate, McKenna provided a final intervention, his last-ditch tackle preventing Ryan Jack from equalising.

Aberdeen's victory moved them into the top six and ended Rangers' spell at the top of the Premiership after just three days.

Morelos was searching for a record of scoring in eight consecutive league games before he was sent off

'All over the pitch, not good enough' - reaction

Rangers manager Steven Gerrard: "We worked on a game plan, every single individual told me they know exactly what they needed to do, but that never happened.

"It's difficult to win matches when you have too many players off it. We've punched above our weight in certain games and 90 minutes ago we were top of the league."

He added: "Alfredo's [Morelos] first yellow for me is a little bit soft but it was probably a foul. The second one he deserves. But it's not important - we've got another red card which is hugely frustrating.

"We could've had another one. [Kyle] Lafferty's on a yellow but he is giving a foul away and gives away another - you're leaving the referee with an opportunity to make it nine."

Aberdeen manager Derek McInnes: "The game was competitive as you expect. It was maybe a bit difficult to referee. But that said, really disappointed with the second yellow card given to Sam Cosgrove.

"I didn't think it was a foul by him, I thought he won the ball. How the referee and the linesman deem that a yellow card offence, I find astonishing.

"In Glasgow, when the fans are right behind the home team, there were a lot of questions asked of my team but we defended admirably and we were very good for our three points."