London (AFP) - Scotland head coach Gregor Townsend believed his time in the role was about to end before he signed a contract extension until April 2026, ending speculation over his future.
The 50-year-old's current deal was due to expire after the World Cup later this year and there had been reports that the Scottish Rugby Union could be looking to replace him.
The former Scotland playmaker, who named an extended 41-man training squad for the tournament in France on Tuesday, had also been linked with several other coaching positions.
But following a third-place finish in the Six Nations, Townsend, who was appointed in 2017, will remain in charge of Scotland for another three years at least.
Townsend, already Scotland's longest-serving coach, told reporters on Tuesday: "I suppose the time when I wasn't getting offered the contract, there was a lot of thinking going on there and a couple of stages in the season I thought 'this will be my last season'.
"So to be able to at least have the discussion and think about the future has been a big positive and I'm obviously delighted to be able to stay with this group in this role for a few more years."
'Sense of purpose'
He added he'd had never come close to moving elsewhere during the uncertainty over his Scotland future.
"Not really," he said."There were a couple of approaches between the Autumn Tests and the Six Nations but I don't think there was any chance I was going to commit to anything before the Six Nations.
"The positive was that during the Six Nations, discussions started to happen between Scottish Rugby and myself."
Townsend, who will have been in charge for nine years if he sees out his contract, insisted he still relished being in charge of Scotland.
"I love the job," he said."You get ups and downs with it but I feel real sense of purpose being in the job."
Townsend, who named an extended 41-man training squad for the World Cup in France on Tuesday, added: "We obviously want to build on that in the next few months ahead."
Scottish Rugby chief executive Mark Dodson hailed the achievements of Townsend, whose side are ranked fifth in the world.
"Gregor Townsend has been the most successful Scotland coach in the history of the professional era and we believe he is the right man to lead the national team beyond this year's Rugby World Cup," he said.
Townsend's squad, led by captain Jamie Ritchie, will be trimmed to a 33-player list ahead of the sport's quadrennial showpiece, which starts in September.
Former captains Stuart Hogg and Stuart McInally, who announced recently they would retire afer the World Cup, are included.
The squad will gather for an initial training camp on May 29 to begin preparations for warm-up matches at home to Italy, France and Georgia and away to the French, in July and August.
Scotland are in a daunting group alongside world champions South Africa, top-ranked Ireland, Tonga and Romania.
Their first match is against the Springboks in Marseille on September 10.