Gregor Townsend said he was proud of his Scotland team’s general performance during last night’s narrow defeat to Wales at Murrayfield but conceded that they were the architects of their own demise by giving away far too many penalties at key moments.

The coach also expressed frustration at the way referee Matthew Carley and Television Match Official Karl Dickson handled the red-carding of Zander Fagerson in the 54th minute.

“Ill-discipline would be the No.1 factor [behind us not winning that game],” said a tetchy Townsend after the 25-24 defeat.

“When you go to 14 men for 25 minutes, it’s going to be more difficult. When you give away penalties that lead to points, that’s obviously not helping your chances of winning either.

“I felt we were in control defensively. There were a dozen phases in the first half where Wales weren’t going forward and then we got caught for offside and they kicked the points.

“We had three penalties in a row from line-out mauls that ended up with a try at the end of the first half, so we’ve got to be better there.

“The loss of Blade Thomson so early in the game certainly affected our line-out. He was playing really well, carrying strongly, and then got caught by a stray knee from one of our own players. Wales did well in the line-out from there until we shored things up when Richie Gray came on and put them under a lot of pressure, but we could have done better in terms of our discipline in that first half.

“There were a couple of finishing issues as well, like Scott Cummings and Gary Graham running the same line for the disallowed try at the start of the second half. With the pressure we had on them, that would have taken

us well ahead, but credit to Wales, when they had their chances, especially through their line-out maul, they scored points.”

Fagerson’s dismissal was controversial. The decision hinged on whether the prop’s shoulder made contact with opposite number Wyn Jones’ head as he tried to clear out a ruck, and the video evidence appeared inconclusive. It certainly did not sound like the TMO was as convinced as Carley about it being a red rather than a yellow card offence.

“I didn’t think they had much of a discussion and I didn’t think they showed enough of the angles,” said Townsend. “They showed one slow-motion angle to begin with, then took ages to find another one. The TMO did say that, because of the player’s late movement, you should make sure there’s no mitigation there, but I thought the whole process could have been much better.

“It’s obviously very serious when someone gets a red card and it just felt that there weren’t the right angles or a proper discussion. There was a discussion between the team of three [the referee and his two assistants] when they were waiting for the angles, and they seemed to make their mind up then.

“Did we see it live? It looked like it was played in slow motion on one angle rather than actually going, ‘was there late movement, was there a clear strike of the head?’

“One of the angles I saw, I don’t know if there was [contact with the head]. But they’re part of the game, red cards, and you have to deal with them. There was one last week and apart from the moment straight after

the red card, I thought our players did very well in that period and got back ahead on the scoreboard.

“We get on with whatever decision the referee has made and there’s nothing we can do about it now. I really believed that we could still win [after Fagerson’s sending off]. The effort and the skill the players showed in that last 10 minutes was outstanding, to create a really good opportunity for Duhan van der Merwe, but it wasn’t enough.”

Meanwhile, Wales head coach Wayne Pivac paid tribute to 20-year-old winger Louis Rees-Zammit, who scored two tries and got the assist for a third, in a man-of-the-match performance – but warned that he is not the finished article yet.

“He took his opportunities well and played well with the ball in hand,” said Pivac. “He’s still got a bit to do on his game without the ball but he’s going to be a very, very exciting player.”

The victory puts Wales top of the Six Nations table ahead of this afternoon’s clash between France and Ireland, which is a big boost to Pivac who was under pressure pre-tournament after the team finished fifth in last year’s competition.

“It is a great result for this group, especially as we had to go deep into our squad due to injuries,” said the coach.

“We’ve built some depth in key positions and it bodes well for the future.”