ISTANBUL — Turkey vowed Friday to escalate military actions in Syria's Idlib province after 33 of its soldiers were killed in an airstrike it blamed on Syria, as the risk of a major military confrontation between Russia and Turkey in the region increased sharply.

Russia, which said its air force was not operating in the area of the attack, accused Turkey of breaching a 2018 cease-fire deal, which limited the deployment of Turkish troops to observation points in the region.

Russian President Vladimir Putin and Turkish President Recep Tayyip Erdogan spoke by phone Friday and will meet in Moscow next week in an effort to resolve the crisis, according to Putin’s spokesman, Dmitry Peskov. The meeting will be held March 5 or 6, Peskov said.

The Kremlin accused Turkey’s military of failing to coordinate the position of its forces with Russian military forces in the region, a claim rejected by Hulusi Akar, Turkey’s defense minister.

“This attack occurred even though the locations of our troops had been coordinated with Russian officials in the field,” he told reporters in Hatay, a southern Turkish province bordering Syria, according to the state-run Anadolu news agency. Akar said Turkey retaliated against Syrian forces by destroying helicopters, tanks, an air defense system and other hardware, and by killing more than 300 Syrian fighters.

Fahrettin Altun, a spokesman for Erdogan, indicated that Turkey’s retaliatory strikes are not over. “Our operations in Syria will continue until we have those responsible for their martyrdom pay dearly,” he wrote on Twitter.

In a pointed message to Turkey, Russia on Friday sent two warships equipped with Kalibr cruise missiles from the Black Sea to the Mediterranean, where they will be based permanently, Black Sea Fleet spokesman Alexei Rulev said, according to Russia’s Interfax news agency. Russia maintains an important naval base in Tartus, Syria, a key strategic objective for Russia in its support of Syrian President Bashar al-Assad.

The Syrian attack on Turkish forces Thursday occurred in southern Idlib province. The death toll rose throughout the evening Thursday and early Friday. Rahmi Dogan, governor of Hatay, announced that 33 Turkish soldiers were killed and dozens more were wounded. The toll was the highest in a single day for Turkish forces during several years of military operations in Syria.

Tensions in the region have escalated sharply as Russian-backed Syrian forces have advanced into Idlib, the last opposition stronghold, infuriating Erdogan, who fears that refugees fleeing the Syrian advance could spill across the border.

The Syrian offensive has caused a humanitarian crisis as hundreds of thousands of displaced Syrians have fled their homes heading toward Turkey, many of them lacking adequate shelter. Turkey has deployed thousands of troops in Syria to prevent Assad’s forces from defeating rebel groups, including Turkish-backed factions, and consolidating Syrian control in Idlib and nearby areas.

Erdogan has threatened to escalate military attacks on Syria if its forces do not retreat. Talks between Moscow and Ankara to resolve the crisis have failed to produce a solution.

In recent days, Russian officials have repeatedly accused Turkey of breaching a 2018 cease-fire deal and of using artillery strikes and attack drones to defend rebel forces, including Turkish-backed groups and others that Russia and Syria consider terrorist organizations. Idlib province is largely controlled by an extremist group that once had ties with al-Qaeda.

Erdogan and Putin discussed the need to cool tensions in the region in their phone call Friday, according to a Kremlin statement. The call was initiated by the Turkish leader, the Kremlin said.

The leaders agreed on a need to increase consultations and improve coordination between the two nations’ militaries in northern Syria, the Kremlin statement said. They also agreed that steps to normalize the situation are needed.

“Serious concern about the escalation of tensions in Idlib, which has led to multiple casualties, including those among Turkish servicemen, was expressed,” the statement said. “The importance of more effective coordination between the defense ministries of Russia and Turkey was underlined.”

Gen. Mark A. Milley, chairman of the U.S. Joint Chiefs of Staff, and Gen. Valery Gerasimov, chief of Russia’s armed forces, also spoke by phone about the crisis Friday, according to the Russian Defense Ministry, which released no details about the call.

Peskov, the spokesman for Putin, said Russia “did all it could to ensure security of Turkish service members” at their observation posts. Peskov said that under the 2018 cease-fire deal signed between Putin and Erdogan in Sochi, Russia, Turkish forces were deployed to observation posts to prevent attacks by extremist militias in the region.

“Our Turkish partners failed to perform this mission, as a significant number of militants are not under their control,” he said.

Turkey has justified its intervention, in part, by saying it is aimed at preventing a bloodbath in Idlib. Hundreds of civilians have been killed during the most recent Syrian offensive, in what human rights groups say are indiscriminate air and artillery strikes that frequently target civilian areas.

Turkey, a NATO member, convened an emergency meeting of the alliance’s ambassadors Friday morning, stopping short of an attempt to invoke NATO’s all-for-one, one-for-all mutual defense pact but still drawing the group into the increasingly tense situation.

Under NATO’s founding treaty, any member can request consultations if it believes its security is under threat. It was only the sixth time in the alliance’s 71-year history that a member has done so.

NATO Secretary General Jens Stoltenberg spoke Thursday night to Turkish Foreign Minister Mehmet Cavusoglu. NATO said in a statement that “Stoltenberg condemned the continued indiscriminate airstrikes by the Syrian regime and its backer Russia in Idlib province.”

Stoltenberg told reporters in Brussels on Friday after the meeting of ambassadors: “Allies offered their deepest condolences for the death of Turkish soldiers in last night’s bombing in Idlib and expressed full solidarity with Turkey. We call on Russia and the Assad regime to stop the attacks.”

Erdogan has threatened to allow millions of refugees and migrants his country hosts to cross into Europe if the international community does not act to halt the violence in Idlib. Turkey appeared to be making good on the threat after the death of its soldiers.

Turkish television stations broadcast images Friday of migrants freely walking toward a land border with Greece or boarding boats in the Aegean Sea — actions that the Turkish authorities had previously prevented.

“We are no longer in a position to hold the refugees,” Omer Celik, a spokesman for Erdogan’s ruling party, said in a statement, according to the Anadolu news agency.

Greek authorities appeared to be denying entry to the migrants, and a spokesman for the United Nations refu­gee agency said it has not seen any increased migrant flows to Greece as a result of Turkey’s actions.

Dixon reported from Moscow. Michael Birnbaum in Stockholm contributed to this report.