President Tayyip Erdogan said on Friday it was not possible for NATO-member Turkey to support plans by Sweden and Finland to join the pact, saying the Nordic countries were "home to many terrorist organisations".
Though Turkey has officially supported enlargement since it joined NATO 70 years ago, its opposition could pose a problem for Sweden and Finland given new members need unanimous agreement.
Finland's plan to apply for NATO membership, announced Thursday, and the expectation that Sweden will follow, would bring about the expansion of the Western military alliance that Russian President Vladimir Putin aimed to prevent by launching the Ukraine invasion.
"We are following the developments regarding Sweden and Finland, but we don't hold positive views," Erdogan told reporters in Istanbul, adding it was a mistake for NATO to accept Greece as a member in the past.
"As Turkey, we don't want to repeat similar mistakes. Furthermore, Scandinavian countries are guesthouses for terrorist organisations," Erdogan said without giving details.
"They are even members of the parliament in some countries. It is not possible for us to be in favour," he added.
NATO Secretary-General Jens Stoltenberg had said the Finns would be "warmly welcomed" and promised a "smooth and swift" accession process, which is also backed by Washington.
But Turkey has repeatedly slammed Sweden and other Western European countries for its handling of organisations deemed terrorists by Ankara, including the Kurdish militant groups PKK and YPG, and the followers of US-based Islamic cleric Fethullah Gulen.
Ankara says Gulenists carried out a coup attempt in 2016. Gulen and his supporters deny the accusation.
"Turkish national security elites view Finland and Sweden as semi-hostile, given the presence of PKK and Gulenists. It's gonna take arm twisting to get sign off," Aaron Stein, research director at the Foreign Policy Research Institute, said on Twitter.
Swedish and Finnish foreign ministries did not immediately comment on Erdogan's statement.
NATO states that membership is open to any "European state in a position to further the principles of this Treaty and to contribute to the security of the North Atlantic area".
Finland and Sweden are already NATO's closest partners, sitting in on many meetings, regularly briefed on the situation in Ukraine and taking part in regular military drills with NATO allies. Much of their military equipment is inter-operable with NATO allies.
However, they cannot benefit from NATO's collective defence clause - that an attack on one ally is an attack on all - until they join the alliance.
Moscow on Thursday called Finland's announcement hostile and threatened retaliation, including unspecified "military-technical" measures.
Turkey has criticised Russia's invasion, sent armed drones to Ukraine and sought to facilitate peace talks between the sides. But it has not backed Western sanctions on Moscow and seeks to maintain close trade, energy and tourism ties with Russia.