President Recep Tayyip Erdogan on Friday said Turkey did not have a "positive opinion" on Finland and Sweden joining NATO, throwing up a potential obstacle for the nations' membership bid.
The leader of NATO-member Turkey spoke ahead of expected confirmations from the Nordic nations on Sunday that they will apply to join the Western military alliance.
Erdogan accused both countries of harbouring "terrorist organisations" in his unfavourable assessment of the membership bids.
"We do not have a positive opinion," Erdogan told journalists after Friday prayers in Istanbul.
"Scandinavian countries are like a guesthouse for terror organisations," he said.
Turkey has long accused Nordic countries, especially Sweden which has a strong Turkish immigrant community, of harbouring extremist Kurdish groups as well as supporters of Fethullah Gulen, a US-based preacher wanted over a failed 2016 coup.
Erdogan cited a "mistake" made by Turkey's former rulers who okayed Greece's NATO membership in 1952.
"We, as Turkey, do not want to make a second mistake on this issue," he said.
Moscow's February 24 invasion of Ukraine has swung political and public opinion in Finland and Sweden in favour of membership as a deterrent against Russian aggression.
Both countries have long cooperated with NATO and are expected to be able to join the alliance quickly.
NATO chief Jens Stoltenberg has repeatedly said they would be welcomed "with open arms".
Turkey's response is the first dissenting voice against the two Nordic countries' NATO prospects.
Sweden's and Finland's foreign ministers responded on Friday by saying they were hoping to meet their Turkish counterpart in Berlin at an informal meeting of NATO foreign ministers on Saturday.
"We will then have the opportunity to discuss a potential Swedish NATO application," Sweden's foreign minister Ann Linde said in a statement to AFP, also noting the "Turkish government had not delivered this type of message directly to us".
Speaking at a Helsinki press conference, Finland's Pekka Haavisto also said he hoped to meet Turkish Foreign Minister Mevlut Cavusoglu during the weekend to "continue our discussion."
Stockholm and Helsinki have cranked up their international contacts to seek support for their potential bids.
Once a country has decided to apply for NATO membership, the alliance's 30 members must agree unanimously to extend a formal invitation, which is followed by membership negotiations.
The final approval could then take place at a NATO summit in Madrid at the end of June. The 30 member states would then have to ratify the decision.
Turkey, which enjoys good relations with Kyiv and Moscow, has been keen to play a mediating role to end the conflict and has offered to host a leaders' summit.
Ankara has supplied Ukraine with combat drones but has shied away from slapping sanctions on Russia alongside Western allies.
Erdogan's comments may also raise tensions with France, whose President Emmanuel Macron has said NATO was undergoing "brain death" partly due to Turkey's behaviour.
Macron has made clear he supports Finland's bid as does the United States.
White House Press Secretary Jen Psaki said on Friday Washington was "working to clarify Turkey's position", adding there was "broad support" for the two countries' joining the alliance.
The Finnish president spoke with Erdogan in April as part of consultations for its NATO bid.
"I thanked President Erdogan for his efforts for peace in Ukraine. Turkey supports Finland's objectives," he tweeted at the time.
Turkey's position on Sweden and Finland's NATO membership risks making it look like the "Hungary of the EU", said Washington Institute fellow Soner Cagaptay.
Pro-Russia Hungary often breaks from its EU colleagues on a broad range of issues, including rule of law and human rights.
Cagaptay said Ankara should have negotiated its terror-related concerns behind closed doors with the two countries.
"The fact that this is done publicly is going to hurt Ankara's image significantly," he said.
But Erdogan is "a clever tactician", said Elisabeth Braw, senior fellow at the American Enterprise Institute.
Listen to the latest songs, only on JioSaavn.com
"He knows that this is an opportunity for Turkey to get something from NATO member states... F-35s, for example," she said, referring to US defence giant Lockheed Martin's jets.