Russian Foreign Minister Sergey Lavrov said on Friday that Moscow will reply with firmness but still must decide on the precise response.

Russia on Friday promised a “tough response” to a U.S. order to shut the Russian consulate in San Francisco and offices in Washington and New York, the latest round in a diplomatic tit-for-tat.

The U.S. issued its order on Thursday and gave Russia 48 hours to comply, intensifying tensions between the two countries.

President Donald Trump’s administration described its action as retaliation for the Kremlin’s “unwarranted and detrimental” demand earlier this month that the U.S. cut its diplomatic staff in Russia.

“The United States is prepared to take further action as necessary and as warranted,” State Department spokeswoman Heather Nauert said. Still, she said the U.S. hoped both countries could now move toward “improved relations” and “increased cooperation.”

Russian Foreign Minister Sergey Lavrov said on Friday that Moscow will reply with firmness but still must decide on the precise response.

“We will have a tough response to the things that come totally out of the blue to hurt us and are driven solely by the desire to spoil our relations with the United States,” he said in a televised meeting with students at Russia’s top diplomacy school.

American officials argued that Russia should refrain from retaliation, noting that Moscow’s ordering of U.S. diplomatic cuts was premised on bringing the two countries’ diplomatic presences into “parity.”

“The United States hopes that, having moved toward the Russian Federation’s desire for parity, we can avoid further retaliatory actions by both sides,” the State Department’s Ms. Nauert said.

Both countries now maintain three consulates on each other’s territory and ostensibly similar numbers of diplomats. Exact numbers are difficult to independently verify.

Mr. Lavrov on Friday also defended Mr. Trump, saying that the new package of sanctions against Russia that Congress adopted last month not only hits Russia but also is designed to “tie Trump’s hands, not let him use his constitutional powers to the full to make foreign policy.”

Several hours after the U.S. announcement, new Russian Ambassador Anatoly Antonov arrived in Washington to start his new posting.

At the airport, Antonov cited a maxim of former Soviet leader Vladimir Lenin as he urged caution and professionalism.

“We don’t need hysterical impulses,” Russian news agencies quoted Mr. Antonov as saying.

The closures on both U.S. coasts marked perhaps the most drastic diplomatic measure by the United States against Russia since 1986, near the end of the Cold War, when the nuclear-armed powers expelled dozens of each other’s diplomats.

And it comes amid some of the broadest strains in their relationship ever since. The two countries have clashed over the wars in Ukraine and Syria, but most significantly over American allegations that Russia meddled in the 2016 U.S. election to boost Trump’s chances of victory. Investigations continue into whether Trump’s campaign colluded with Moscow.

By Saturday, the Russians must close their consulate in San Francisco and an official residence there. Though Russia can keep its New York consulate and Washington embassy, trade missions housed in satellite offices in both of those cities must shut down, a senior Trump administration official said. The official briefed reporters on a conference call on condition of anonymity.

Outside the consulate building high atop a hill overlooking the San Francisco Bay, there were no visible signs of an exodus on Thursday. Consular officials walked in and out of the stately building, and Russian citizens who had scheduled appointments said they were able to pick up or renew their passports.

American counterintelligence officials have long kept a watchful eye on Russia’s outpost in San Francisco, concerned that people posted to the consulate as diplomats were engaged in espionage. The U.S. late last year kicked out several Russians posted there, calling it a response to election interference.

The U.S. isn’t expelling any Russian officials this time. Those who work at the shuttered offices can be reassigned elsewhere in the United States, the senior official said.

One of the buildings is believed to be leased, but Russia will maintain ownership over the others, said the official, adding that Moscow can determine if it wants to sell them or otherwise dispose of the properties.

The forced closures are the latest in an intensifying exchange of diplomatic broadsides.

In December, President Barack Obama kicked out dozens of Russian officials, closed Russian recreational compounds in New York and Maryland, and imposed sanctions on Russian people and businesses. Russian President Vladimir Putin withheld from retaliating. The next month, Mr. Trump took office after campaigning on promises to improve U.S.-Russia ties.

But earlier this month, Mr. Trump begrudgingly signed into law stepped-up sanctions on Russia that Congress pushed to prevent him from easing up on Moscow. The Kremlin retaliated by telling the U.S. to cut embassy and consulate staff down to 455 personnel, from a level hundreds higher.

Russia said 755 personnel in all would have to go to reach the new limit. The U.S. never confirmed how many diplomatic staff it had in the country at the time. As of Thursday, the U.S. has complied with the order to reduce staff to 455, officials said.

The reductions are having consequences for Russia. The U.S. has temporarily suspended non-immigrant visa processing for Russians seeking to visit the United States and was scheduled to resume it on Friday at a “much-reduced rate.” The U.S. will process visas only at the embassy in Moscow, meaning Russians can no longer apply at U.S. consulates in St. Petersburg, Yekaterinburg and Vladivostok.

Despite the exchange of penalties, there have been narrow signs of U.S.-Russian cooperation that have transcended the worsening ties. In July, Mr. Trump and Mr. Putin signed off on a deal with Jordan for a cease-fire in southwest Syria. The U.S. says the truce has largely held.