The alliance's secretary-general, Jens Stoltenberg, said the agreement addressed "Turkey's concerns including around arms exports and the fight against terrorism."
"Finland and Sweden commit to fully support Turkiye (Turkey) against threats to its national security. This includes further amending their domestic legislation, cracking down on PKK activities and entering into an agreement with Turkiye on extradition," he said after talks with Turkish President Tayyip Erdogan, Swedish Prime Minister Magdalena Andersson and Niinisto.
The breakthrough came after four hours of talks just before a Nato summit began in Madrid, averting an embarrassing impasse at the gathering of 30 leaders that aims to show resolve against Russia, now seen by the U.S.-led alliance as a direct security threat rather than a possible adversary.
It means Helsinki and Stockholm can proceed with their application to join the nuclear-armed alliance, cementing what is set to be the biggest shift in European security in decades, as the two, long neutral Nordic countries seek Nato protection.
Stoltenberg said Nato's 30 leaders would now invite Finland, which shares a 1,300 km (810-mile) border with Russia, and Sweden to join Nato and that they would become official "invitees".