Denmark’s parliament has unanimously approved a security agreement between Denmark, Greenland and the US, months after Donald Trump threatened to invade the largely autonomous territory. The pact was approved 109-0 and is intended to establish a framework for future cooperation.

Signed in September by US president Donald Trump, Greenland prime minister Jens-Frederik Nielsen and Danish prime minister Mette Frederiksen, the agreement updates a 1951 defence pact. It gives the US underwater access to Greenland and specific permission to construct a missile defence system.

The agreement recognises Greenland, a former Danish colony, as an equal partner and says that if it becomes fully independent of Denmark, it would remain in Nato. Greenland’s parliament approved the deal earlier this month.

Danish foreign minister Lars Løkke Rasmussen said the remaining step for the agreement to take effect was for Trump to notify the US Congress. “We have now resolved our part of the equation,” he said after the vote. “This is a positive development, as it removes all uncertainty surrounding Greenland and establishes a proper framework for future cooperation.”

Rasmussen said trust with the US had been damaged and would need rebuilding. “Consequently, there is a significant task of rebuilding ahead. But this will take place within the framework of an agreement, which is a good thing,” he said.

Before the deal was signed, Trump said the US would “immediately begin the process of developing a large military presence in the appropriate part of Greenland”. Rasmussen said on Thursday that the US had not informed Denmark of plans to establish new military bases.

The US ambassador to Denmark, Ken Howery, said on social media that he was “thrilled that the Danish parliament today voted unanimously 109-0 to ratify the Greenland security agreement”. In a statement, he welcomed the agreement’s approval, calling it a “historic US-Denmark-Greenland defence agreement” and saying it would modernise the partnership and strengthen security for the US, Denmark, Greenland and Nato.

Relations between the US, Denmark and Greenland, as well as the Nato alliance, had come under unprecedented strain amid Trump’s repeated threats to take over Greenland. Denmark had prepared for a possible US invasion. In January, Copenhagen reportedly sent blood bags and explosives to destroy runways in case of an attack.