Turkish MPs have ratified Sweden's bid to join Nato in a long-delayed vote that represents a big step forward on the Nordic nation's path to membership.
Sweden applied to join in 2022 after Russia's full-scale invasion of Ukraine, but Turkey withheld approval amid a row over what it called Sweden's support to Kurdish separatists.
Turkish President Erdogan is expected to sign the legislation within days.
It leaves Hungary the sole Nato member yet to ratify Sweden's accession.
Swedish Prime Minister Ulf Kristersson posted on social media: "Today we are one step closer to becoming a full member of Nato".
And Nato Secretary General Jens Stoltenberg welcomed Turkey's vote, saying he was counting on Hungary to "complete its national ratification as soon as possible".
Hungary has accused Sweden of having a hostile attitude. In March Hungarian government spokesman Zoltán Kovács accused officials in Sweden of sitting on a "crumbling throne of moral superiority". Stockholm has previously accused the Hungarian government of backsliding on the EU's democratic principles.
However there have been signs of progress. Hungarian Prime Minister Viktor Orban on Tuesday invited his Swedish counterpart to Budapest for talks, stating in a letter that "a more intensive dialogue could contribute to reinforcing trust".
Sweden's Foreign Minister Tobias Billstrom said he saw "no reason" to negotiate with Hungary "at this point", but added that the two nations "can have a dialogue and continue to discuss questions".
Turkey had been blocking Sweden's application until July, when an agreement was reached. On Tuesday evening lawmakers voted 287-55 in favour of Swedish membership. President Recep Tayyip Erdogan is now expected to sign the legislation.
Turkey had argued Sweden was giving refuge to Kurdish militants, and needed to do more to crack down on rebel groups like the Kurdistan Workers' Party (PKK), which it considers a terrorist organisation. The EU and US have also designated the PKK as a terrorist group.
Like any of Nato's 31 member countries, Turkey has the power to block new nations from joining the group.
But Sweden introduced tougher anti-terrorism laws in June, making it illegal to give financial or logistical help to terrorist groups.
Sweden and its eastern neighbour Finland, both long considered as militarily neutral, announced their intention to join Nato in May 2022, several months after Russia launched its full-scale invasion of Ukraine. Finland formally joined in April, doubling the length of the alliance's border with Russia.