The Turkish president held talks with President Niinisto, Swedish Prime Minister Magdalena Andersson, and NATO Secretary-General Jens Stoltenberg at the summit.
A senior official in the US government said that President Biden had spoken with Erdogan on Tuesday morning on behalf of Sweden and Finland to ensure that the talks are smooth, Associated Press reported.
Turkish approval is essential to Sweden and Finland's membership in NATO, which requires a unanimous consensus to admit a new member.
All of NATO's 30-member countries hold the power to veto a new member.
There are three main questions here.
What was Turkey's underlying issue with Sweden and Finland?
What did the three countries agree up on at the NATO summit?
Why do Sweden and Finland want to join NATO?
Ankara's objection primarily stemmed from grievances with Stockholm's – and to some extent, Helsinki's – perceived support towards the banned Kurdistan Workers' Party (PKK), the far-left Revolutionary People's Liberation Party/Front (DHKP-C), and the supporters of the Fethullah Gülen, a US-based Muslim cleric, who Turkey claims was behind an unsuccessful military coup in 2016.
Turkey also wanted Sweden and Finland to lift an arms embargo that was imposed after the former launched an offensive against the Syrian Kurdish YPG (People's Defense Units) militia during the Syrian Civil War.
In the war, the Erdoğan government has sided with the Syrian Democratic Forces (SDF) and other rebels fighting against President Bashar al-Assad.
The SDF, however, is primarily led by the People's Defense Units (YPG), a Kurdish militia linked to the Kurdistan Workers' Party (PKK).
The PKK has been designated as a terrorist organisation by Turkey and the US, and Ankara wants to prevent it from achieving its goal – the formation of a Kurdish state independent of Turkey.
Therefore, NATO Secretary General Jens Stoltenberg summed it up well while speaking to reporters in Madrid, stating, "Turkey, Finland and Sweden have signed a memorandum that addresses Turkey's concerns, including around arms exports, and the fight against terrorism."
The Joint Memorandum
All three countries signed a "trilateral memorandum" to "extend their full support against threats to each other's security".
The third point of the document stated that "one of the key elements of the Alliance is unwavering solidarity and cooperation in the fight against terrorism, in all its forms and manifestations, which constitutes a direct threat to the national security of Allies as well as to international peace and security."
In point number 5, Finland and Sweden confirmed "that the PKK is a proscribed terrorist organistion."
And in point number 7, both countries confirmed that "there are no national arms embargoes in place" them and Turkey.
Additionally, Swedish Prime Minister Magdalena Andersson said the agreement with Turkey was "a very important step for NATO".
Erdogan's office, on the other hand, said it "got what it wanted" from Sweden and Finland.
Why do Finland and Sweden Seek NATO Membership?
The Russian invasion of Ukraine has pushed Finland and Sweden to seek membership of the intergovernmental military alliance.
Both Sweden and Finland had been non-aligned, that is, neutral, for a long period of time.
At a joint press conference in Stockholm last month, however, the prime ministers of both countries said that Russia's invasion of Ukraine had changed Europe's "whole security landscape" and had "dramatically shaped mindsets" of the people in their respective countries.
Magdalena Andersson had argued that "there is a before and after 24 February," (the date on which Russia invaded Ukraine) and that this was "a very important time in history," reported The Guardian.
On the other hand, Prime Minister Sanna Marin had said that Finland had to be "prepared for all kinds of actions from Russia" and that "everything had changed" when Moscow attacked Ukraine.
"There is no other way to have security guarantees than under NATO's deterrence and common defence as guaranteed by the alliance's Article 5," Marin added.
The logic is simple. Joining NATO would allow Sweden and Finland to avoid a Ukraine-like scenario, where if attacked by an aggressor like Russia, other member states will be obligated to intervene against that aggressor in defence of the victim state.
That is the privilege that Ukraine wanted for so long but did not have.
(With inputs from Reuters, AP, and Politico.)