NATO's 30 allies have signed an accession protocol for Finland and Sweden to allow them to join the alliance once allied parliaments ratify the decision, the most significant expansion since the mid-1990s.
"This is truly an historic moment," NATO Secretary-General Jens Stoltenberg said alongside the foreign ministers of the two countries.
"With 32 nations around the table, we will be even stronger."
The protocol means Helsinki and Stockholm can participate in NATO meetings and have greater access to intelligence but will not be protected by the NATO defence clause that an attack on one ally is an attack against all until ratification. That is likely to take up to a year.
NATO's 30 ambassadors and Mr Stoltenberg stood together for a photo in which the foreign ministers of Sweden and Finland held up their signed protocols, before breaking out into applause.
"Thank you for your support! Now the process of ratification by each of the allies begins," Swedish Foreign Minister Ann Linde said on Twitter.
"Look forward to working together in ensuring our collective security," she said.
However, Turkey's President Tayyip Erdogan warned last Thursday at a NATO summit in Madrid that said Finland and Sweden must first keep the promises made to Turkey in a deal or ratification will not be sent to the Turkish parliament.
After weeks of diplomacy, Mr Erdogan and his Finnish and Swedish counterparts agreed on a series of security measures to allow the two Nordic countries to overcome the Turkish veto that Ankara imposed in May due to its concerns about terrorism.
According to the signed memorandum, Finland and Sweden pledged not to support the Kurdish militant PKK and YPG groups or the network of US-based cleric Fethullah Gulen, which Turkey says staged a 2016 coup attempt and which it labels a terrorist organisation with the acronym FETO.