Turkey agreed Tuesday to lift its opposition to Sweden and Finland joining NATO, ending an impasse that had clouded a leaders' summit opening in Madrid amid Europe's worst security crisis in decades, triggered by the war in Ukraine.
After urgent top-level talks with leaders of the three countries, alliance Secretary General Jens Stoltenberg said that "we now have an agreement that paves the way for Finland and Sweden to join NATO." He called it "a historic decision."
Among its many shattering consequences, President Vladimir Putin's invasion of Ukraine has prompted Sweden and Finland to abandon their long-held nonaligned status and apply to join NATO as protection against an increasingly aggressive and unpredictable Russia — which shares a long border with Finland. Under NATO treaties, an attack on any member would be considered an attack against all and trigger a military response by the entire alliance.
NATO operates by consensus, and Turkish President Recep Tayyip Erdogan had threatened to block the Nordic pair, insisting they change their stance on Kurdish rebel groups that Turkey considers terrorists.
After weeks of diplomacy and hours of talks on Tuesday, Finnish President Sauli Niinistö said the three leaders had signed a joint agreement to break the logjam.
Turkey said it "got what it wanted" including "full cooperation ... in the fight against" the rebel groups.
Stoltenberg said leaders of the 30-nation alliance will issue a formal invitation to the two countries to join on Wednesday. The decision has to be ratified by all individual nations, but he said he was "absolutely confident" Finland and Sweden would become members, something that could happen within months.
Swedish Prime Minister Magdalena Andersson said the agreement was "good for Finland and Sweden. And it's good for NATO."
She said completing the process of membership should be done "the sooner the better."
"But there are 30 parliaments that need to approve this and you never know," Andersson told the Associated Press.
Turkey hailed Tuesday's agreement as a triumph, saying the Nordic nations had agreed to crack down on groups that Ankara deems national security threats, including the Kurdistan Workers' Party, or PKK, and its Syrian extension. It said they also agreed "not to impose embargo restrictions in the field of defense industry" on Turkey and to take "concrete steps on the extradition of terrorist criminals."
Turkey has demanded that Finland and Sweden extradite wanted individuals and lift arms restrictions imposed after Turkey's 2019 military incursion into northeast Syria.
Turkey, in turn, agreed "to support at the 2022 Madrid Summit the invitation of Finland and Sweden to become members of NATO."
Details of exactly what was agreed were unclear. Amineh Kakabaveh, an independent Swedish lawmaker of Kurdish origin whose support the government depends on for a majority in Parliament, said it was "worrisome that Sweden isn't revealing what promises it has given Erdogan."
Andersson dismissed suggestions Sweden and Finland had conceded too much.
Asked if the Swedish public will see the agreement as a concession on issues like extraditions of Kurdish militants regarded by Ankara as terrorists, Andersson said "they will see that this is good for the security of Sweden."
U.S. President Joe Biden congratulated the three nations on taking a "crucial step."
Amid speculation about a U.S. role in ending the deadlock, a senior administration official said Washington did not offer any concessions to Turkey to coax it to accept a deal. But the official said the U.S. played a crucial role in helping bring the two parties closer together, and President Biden spoke with Erdogan Tuesday morning at the behest of Sweden and Finland to help encourage the talks.
The agreement came at the opening of a crucial summit, dominated by Russia's invasion of Ukraine, that will set the course of the alliance for the coming years. The summit was kicking off with a leaders' dinner hosted by Spain's King Felipe VI at the 18th-century Royal Palace of Madrid.
Top of the agenda in meetings Wednesday and Thursday is strengthening defenses against Russia, and supporting Ukraine.
Moscow's invasion on Feb. 24 shook European security and brought shelling of cities and bloody ground battles back to the continent. NATO, which had begun to turn its focus to terrorism and other non-state threats, has had to confront an adversarial Russia once again.
President Biden said NATO was "as united and galvanized as I think we have ever been."
A Russian missile strike Monday on a shopping mall in the central Ukrainian city of Kremenchuk was a grim reminder of the war's horrors. Some saw the timing, as Group of Seven leaders met in Germany and just ahead of the NATO gathering, as a message from Moscow.
Ukrainian President Volodymyr Zelenskyy, who is due to address NATO leaders by video on Wednesday, called the strike on the mall a "terrorist" act.
Kyiv Mayor Vitali Klitschko traveled to Madrid to urge the alliance to provide his country with "whatever it takes" to stop the war.
"Wake up, guys. This is happening now. You are going to be next, this is going to be knocking on your door just in the blink of an eye," Klitschko told reporters at the summit venue.
Stoltenberg said the meeting would chart a blueprint for the alliance "in a more dangerous and unpredictable world" — and that meant "we have to invest more in our defense," Stoltenberg said. Just nine of NATO's 30 members meet the organization's target of spending 2% of gross domestic product on defense. Spain, which is hosting the summit, spends just half that.
Stoltenberg said Monday that NATO allies will agree at the summit to increase the strength of the alliance's rapid reaction force nearly eightfold, from 40,000 to 300,000 troops. The troops will be based in their home nations, but dedicated to specific countries on NATO's eastern flank, where the alliance plans to build up stocks of equipment and ammunition.
Beneath the surface, there are tensions within NATO over how the war will end and what, if any, concessions Ukraine should make to end the fighting.
There are also differences on how hard a line to take on China in NATO's new Strategic Concept — its once-a-decade set of priorities and goals. The last document, published in 2010, didn't mention China at all.
The new concept is expected to set out NATO's approach on issues from cybersecurity to climate change — and the growing economic and military reach of China, and the rising importance and power of the Indo-Pacific region. For the first time, the leaders of Japan, Australia, South Korea and New Zealand are attending the summit as guests.
Some European members are wary of the tough U.S. line on Beijing and don't want China cast as an opponent.
In the Strategic Concept, NATO is set to declare Russia its number one threat.
Russia's state space agency, Roscosmos, marked the summit's opening by releasing satellite images and coordinates of the Madrid conference hall where it is being held, along with those of the White House, the Pentagon and the government headquarters in London, Paris and Berlin.
The agency said NATO was set to declare Russia an enemy at the summit, adding that it was publishing precise coordinates "just in case."
Additional reporting by The Associated Press.