Despite being in a strong half-time position, leading 17-8, Gregor Townsend’s men succumbed after the break.
A key turning point was Zander Fagerson’s red card on 54 minutes when the score was 17-15.
There was plenty of debate surrounding the decision.
Ferguson was adjudged to have broken law 9.2 for foul play which refers to “dangerous play in a ruck or maul”.
The law reads: “a) A player must not charge into a ruck or maul. Charging includes any contact made without binding onto another player in the ruck or maul.
"b) A player must not make contact with an opponent above the line of the shoulders.”
Wales star Alun Wyn Jones said the card was "an interesting one”.
Former Scotland star John Barclay felt it was a harsh decision by referee Matthew Carley.
"It’s dangerous play,” he said on BBC.
"I think it looks much, much worse slowed down. When you see that in normal speed it doesn’t look like a red card, for me that’s a yellow card.
“I’m all for protecting the players, where is he meant to put his shoulder?”
Jeremy Guscott said: “He seems to be leading with his shoulder. Why can’t he come in a bit lower and keep his head up? At least he will know where he is going.”
Jonathan Davies added: "He’s come from a long way out and is reckless so by the letter of the law, he’s off, red card.”