Hungary's parliament has approved Sweden's NATO accession, clearing the last hurdle before the historic step by the Nordic country whose neutrality lasted through two world wars and the simmering conflict of the Cold War.
Hungary's vote ended months of delays to complete Sweden's security policy shift and followed a visit by Swedish Prime Minister Ulf Kristersson on Friday during which the two countries signed an arms deal.
Sweden's NATO membership was supported by 188 MPs in the Hungarian parliament, with six against and no abstentions.
Hungarian Prime Minister Viktor Orban's government has faced pressure from NATO allies to fall in line and seal Sweden's accession to the alliance.
"Finally it is done, Sweden is the 32nd member of the alliance, and this way NATO has become stronger," Agnes Vadai, an MP of the opposition party Democratic Coalition (DK) told parliament.
Sweden abandoned its non-alignment policy for greater safety within the North Atlantic Treaty Organisation after Russia's invasion of Ukraine in 2022.
With Sweden following Finland into NATO, President Vladimir Putin has effectively achieved the very thing he sought to avert when he launched his war in Ukraine - an expansion of the alliance, its leaders have said.
While Finland became a NATO member last year, Sweden was kept waiting as Turkey and Hungary, which both maintain better relations with Russia than other members of the US-led alliance, raised objections.
Turkey withheld ratification on Sweden's membership demanding tougher action against militants from the Kurdistan Workers' party (PKK) it said had made a home in Sweden.
Sweden changed its laws and relaxed rules over arms sales to assuage Turkey.
President Tayyip Erdogan also linked ratification with US approval of sales of F-16 fighter jets to Turkey, with Turkey now expecting the United States to work on securing the US Congress' endorsement.
Hungary's foot-dragging was less clear in nature, with the government in Budapest mostly venting its annoyance over Swedish criticism of the direction of democratic development under nationalist Prime Minister Orban rather than any concrete demands.
Orban - who has refused to send weapons to neighbouring Ukraine and repeatedly criticised sanctions against Russia - on Monday again urged a ceasefire in Ukraine.
The accession of Sweden, which has not been at war since 1814, and Finland is the most significant expansion of the alliance since its move into eastern Europe in the 1990s.
While Sweden has ramped up co-operation with the alliance in recent decades, contributing to operations in places such as Afghanistan, its membership is set to simplify defence planning and co-operation on NATO's northern flank.
Sweden also brings resources such as cutting-edge submarines tailored to Baltic Sea conditions and a sizeable fleet of domestically produced Gripen fighter jets into the alliance.
It is hiking military spending and should reach NATO's threshold of 2 per cent of GDP this year.
The ratification will be signed by the Speaker of parliament and Hungary's president within a few days, after which the remaining formalities, such as depositing accession documentation in the United States, are likely to be concluded swiftly.