STOCKHOLM, May 15 (Reuters) - NATO and the United States said on Sunday they were confident Turkey would not hold up membership of Finland and Sweden in the Western military alliance, as the two Nordic states took firm steps to join in response to Russia's invasion of Ukraine.

Finnish President Sauli Niinisto confirmed on Sunday that his country would apply to join NATO, while Sweden's ruling Social Democrats announced an official policy change that would pave the way for their country to apply within days.

Swedish Prime Minister Magdalena Andersson said she will go to parliament on Monday to assure support for an application, which NATO allies expect to be made jointly with Finland.

"Today the Swedish Social Democratic Party took a historic decision to say yes to apply for a membership in the NATO defence alliance," tweeted Sweden's foreign minister, Ann Linde. "The Russian invasion of Ukraine has deteriorated the security situation for Sweden and Europe as a whole."

The country's defence minister, Peter Hultqvist, warned that Sweden would be in a perilous situation if it was the only country around the Baltic that remained outside NATO. "We would be left behind," he said.

Turkey, which had surprised its allies in recent days by saying it had reservations about Finnish and Swedish membership, laid out its demands on Sunday on the sidelines of a meeting of foreign ministers in Berlin. Ankara said it wanted the Nordic countries to halt support for Kurdish militant groups present on their territory, and lift bans on some sales of arms to Turkey.

"I'm confident that we will be able to address the concerns that Turkey has expressed in a way that doesn't delay the membership," NATO Secretary-General Jens Stoltenberg said.

U.S. Secretary of State Antony Blinken declined to go into details of closed-door conversations in Berlin but echoed Stoltenberg's position.

"I'm very confident that we will reach consensus on that," Blinken told reporters, adding that NATO was "a place for dialogue".

Turkey's Foreign Minister Mevlut Cavusoglu said talks with Swedish and Finnish counterparts in Berlin had been helpful. The two countries had made suggestions to respond to Ankara's concerns, which Turkey would consider, while he had provided them proof terrorists were present on their territory, he said.

He singled out Sweden in particular, saying the Kurdish militant group the PKK, banned as terrorists by the United States and EU, had held meetings in Stockholm over the weekend.

Nevertheless, he said Turkey did not oppose the alliance's policy of being open to all European countries who wish to apply.

Any decision on NATO enlargement requires approval by all 30 allies and their parliaments. Ankara, a NATO member for 70 years, will be under immense pressure to yield, NATO diplomats said, because the alliance considers that the accession of Finland and Sweden would hugely strengthen it in the Baltic Sea.