With the Scots leading 20-17, a series of England scrums put the home pack under severe pressure as the clock moved past the 80-minute mark.
Referee Ben O’Keeffe called for reset after reset but when England finally got the ball away, Scotland managed to repel them by winning a turnover on their own 22. Captain Stuart Hogg then kicked the ball into touch to end the game, prompting an eruption of noise in the stadium.
Townsend said the closing moments had been hard to take in the coaches’ box amid fears that England might have been awarded a penalty.
Hearts reach a decision on Jacob Davenport contract
Hibs chief Ben Kensell vows to 'address' missile throwing at Hearts defender Alex Cochrane; as Kris Boyd demands SPFL 'do more'
'Not good enough.' Hearts hit out at Hibs fans as lighter hits Alex Cochrane at Easter Road
How the Hearts players rated in the draw against Hibs
Hearts debrief: Barrie McKay's threat, several missed chances, need for another forward
“The heart rates for all of us were the highest they’d been the whole game,” said the coach as Scotland opened their 2022 Six Nations campaign with a hard-fought victory.
“There was an element of what would happen when the ball came out of the scrum, or whether the referee would penalise one team or another.
“I think one of the scrums we thought we were going to get the penalty and another we thought England might get the penalty. I’m glad it wasn’t decided by a scrum decision and we had to defend.
“It was always going to be difficult for a team in that weather to try and get a try or force a penalty. I’m really proud with the effort in the scrum and the phase defence.”
Replacement scrum-half Ben White scored a first-half try and then Scotland were awarded a penalty try in the second period when England hooker Lewis Cowan-Dickie deliberately slapped a Finn Russell cross-kick into touch under pressure from Darcy Graham.
In between, Marcus Smith scored England’s only try and kicked four penalties on his Six Nations debut and the visitors led 17-10 with 15 minutes remaining. But then came the Cowan-Dickie incident which saw the hooker yellow carded and gave Scotland back the momentum.
They have now claimed four of the last five Calcutta Cups and beaten England twice in a row for the first time since 1983-84. Townsend’s record in this fixture far exceeds that of all previous Scotland coaches in the professional era. He has won three, drawn one and lost one against England.
“This team have done really well in this fixture,” he added. “We’ve had the trophy four times out of the last five.
“We didn’t get close to our best rugby today, but the standards we’ve set are much higher than a few years ago. Obviously it’s great for our team but we’re on a five game journey here.
“We know it’s just the first game. For our people, we know it means the world to them. I remember in 2000 when we lost every game in the championship, until winning the last against England made the season, made people’s years rather than if we’d won three of four games that season.
“We know how much this means to our supporters and the whole nation, so we start with a win for them, but we have four more games. If we want to deliver something special we’ve got to play really well next week.”
Scotland travel to Cardiff next weekend to take on Wales, the reigning Six Nations champions but who lost their opener to Ireland in Dublin.