Hungary's parliament has voted to ratify Finland's bid to join NATO - 182 votes in favour and six against.
It moves Finland one step closer to joining the military alliance, pending ratification by Turkey.
Sweden also applied to join NATO following Russia's invasion of Ukraine last year, ending two centuries of Swedish neutrality.
Under Article 10 of NATO's Treaty, all alliance members must approve the application of a new member state.
The Swedish and Finnish applications were accepted last June at a NATO summit in Madrid and, by last September, 28 of NATO's existing 30 members had ratified the bids.
Hungary and Turkey were the two hold-outs.

Last week, Turkish state broadcaster TRT reported that a parliamentary committee in Ankara had approved a bill to ratify the Finnish bid, and a vote by Turkey's parliament is expected soon.
But this still leaves the Swedish bid in limbo.
A clear majority of Swedes - 74% according to one poll by Gallop last September - favour joining NATO. And last week, members of the Riksdag, Sweden's parliament, voted overwhelmingly to approve the country's application to join the alliance.
Turkey and Hungary have different reasons for holding up Sweden's application.
Ankara alleges that Stockholm has allowed members of the PKK, an outlawed Kurdish terrorist group, to live in Sweden for years. The PKK has been engaged in a guerrilla conflict against the Turkish state since 1984.
Hungary's reason appears to be more a matter of hubris.

Prime Minister Viktor Orban, whose populist Fidesz party holds a two-thirds majority in the Hungarian parliament, says that he is in favour of Sweden's membership bid.
But speaking last month on Hungarian public radio, when it looked like the Hungarian parliament would vote on the Swedish and Finnish bids at the same, Mr Orban said that some Hungarian MPs were not "very enthusiastic" about extending NATO's border with Russia. (Finland shares a 1,300km border with the Russian Federation.)
He said that another group of MPs thought "it’s not right for them [Sweden and Finland] to ask us to take them on board while they're spreading blatant lies about Hungary, about the rule of law in Hungary, about democracy, about life here".
Last Thursday, before a European Council Summit, Sweden's Prime Minister Ulf Kristersson said he did not know why Hungary had decided to treat his country's NATO membership application separately from Finland's bid.

To that end, he received a blunt reply on Twitter from Balazs Orban, political director for the Hungarian prime minister and a Fidesz MP.
In it, he provided examples of comments, which he said were made by Swedish officials dating back to 2021.
Mr Balazs Orban (no relation to the PM) said that one Swedish minister had, in 2022, labelled Hungary's government as "xenophobic", while another had, in 2021, called for the European Union to stop payments to Hungary.
It was the first direct explanation issued by a Hungarian government official about Budapest's reluctance to ratify Sweden's membership bid.
Four successive election victories since 2010 and a two-thirds majority in Hungary’s national assembly have enabled Mr Orban's Fidesz party to legally change the country's constitution, reshape its judiciary and exert tighter control over Hungary's media.
In 2021, Hungary's parliament voted to ban the use of materials in schools that promoted homosexuality and gender change - the European Commission referred Hungary to the Court of Justice of the EU over the law.
Budapest, it appears, wants Swedish politicians to stop talking about the Hungarian government's handling of rule-of-law in order for it to greenlight the bid to join NATO.
No date has been set by Ankara or Budapest on when either country's parliament will ratify Sweden's NATO membership application.