Nato membership would be a “cornerstone” of an independent Scotland’s security policy, Nicola Sturgeon has said.

The First Minister reaffirmed her party’s commitment to joining the alliance if Scotland leaves the UK on the same day Scottish Greens co-leader – and Scottish Government minister – Patrick Harvie said his party was opposed to membership.

Speaking at the Brookings Institution think tank in Washington DC on Monday as part of a foreign outreach trip, Ms Sturgeon said: “The party I lead, the Scottish National Party determined back in 2012 – at that time a reversal of a longstanding position – that should Scotland become independent it should seek membership of Nato.

“There is no doubt that the events of the last three months have strengthened my conviction that this position is absolutely the right and essential one.

“I am even more firm in my view today that, coupled with a strong relationship with the United Kingdom, membership of the European Union and membership of Nato will be cornerstones of an independent Scotland’s security policy.”

The First Minister went on to tell attendees at the event of Scotland’s “strategic position” in the world, adding: “We are clearer than ever that membership of Nato would not only be vital to Scotland’s security – though it would most certainly be that – it would also be the principal way in which an independent Scotland, in an interdependent world, would contribute to the collective security of our neighbours and allies.”

The SNP and Scottish Greens signed a powersharing agreement last year that saw both of the party’s co-leaders given junior ministerial jobs and the publication of a broad shared policy platform.

Speaking to the Daily Record, Mr Harvie said he did not see “any appetite” from Green members to change their longstanding opposition to the block, adding: “What I do see is a recognition that strategic cooperation is really important – that our peace and security depends on countries working together.

“One of the interesting things about the current crisis is it’s an attempt to show that coordinated concerted economic measures can be used as an alternative to military intervention.

“An institution like the EU is, in some ways, more critical than Nato in the immediate term.”

In the event on energy security in Europe, the First Minister also stressed the importance of securing a just transition away from fossil fuels, ensuring jobs and investment were secured in communities that rely on oil and gas, as well as taking a number of swipes at former US president Donald Trump.

In her speech, Ms Sturgeon praised the work of the US Government, in particular of climate envoy John Kerry, during Cop26 in Glasgow, and when asked later how the Americans could help Europe in ensuring energy security, the First Minister joked: “Don’t re-elect Trump.”

The former president, who opposed an offshore windfarm off the coast of the Aberdeenshire golf course he owns, has not ruled out another run for the White House in 2024.

The First Minister met US deputy secretary of state Wendy Sherman on the first day of her visit to the American capital on Monday, as well as being welcomed to the US Capitol by House speaker Nancy Pelosi – one of the highest-profile figures in US politics.

Speaking to journalists at the Capitol, the First Minister said: “Scotland and the United States are longstanding friends and allies.

“The United States is a very valuable and important economic and trading partner so it’s a privilege for me to be here to renew and to strengthen that relationship as we stand together as nations in defence of those values we hold dear.”