MOSCOW — Russia accused the United States on Friday of a “gross violation of international law” after the Trump administration gave Moscow two days to shutter diplomatic outposts in San Francisco and other American cities.

As Russian diplomats rushed to meet the Saturday deadline, black smoke was seen billowing out of the chimney at the San Francisco consulate, one of three Russian facilities being forcibly closed. Firefighters, who were turned away by Russian officials when they responded to the scene, said the Russians were burning something in their fireplace.

In Moscow, the Russian government claimed that U.S. officials were planning to search both the consulate and apartments used by their diplomats on Saturday, though there were no indications from the U.S. suggesting that was the case. The State Department said merely that it planned to “secure and maintain” the properties and that Russia wouldn’t be allowed to use them for “diplomatic, consular, or residential purposes” any longer.

Still, the Kremlin appeared to be wrestling with how forcefully to react to the U.S. order, the latest in a series of escalating retaliatory measures between the former Cold War foes. President Vladimir Putin’s foreign policy adviser, Yuri Ushakov, said Russia needs to “think carefully about how we could respond” to one of the thorniest diplomatic confrontations between Washington and Moscow in decades.

“One does not want to go into a frenzy, because someone has to be reasonable and stop,” Ushakov said.

The diplomatic machinations came the day after the Trump administration ordered three Russian facilities to close: the San Francisco consulate and trade missions in New York and Washington. The Russian Embassy in Washington is not affected, nor are three other Russian consulates in the U.S., including in New York.

The Trump administration said the order was retaliation for the Kremlin’s “unwarranted and detrimental” demand last month that the U.S. substantially reduce the size of its diplomatic staff in Russia. But Russia, for its part, justified its call for cuts to U.S. embassy and consular personnel as a reaction to new sanctions the U.S. Congress approved in July.

Russian Foreign Minister Sergey Lavrov said Friday that Moscow would reply with firmness to the forced closure of the diplomatic posts, but needed time to study Washington’s directive and to decide on a 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,” Lavrov said in a televised meeting with students at Russia’s top diplomacy school.

Despite Russia’s claim the U.S. is violating international law, the Trump administration has defended the closures by citing the Vienna Convention on Consular Relations. The U.S. has said the 1960s-era pact gives host countries the right to consent to foreign countries establishing consular posts — or not.

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.

American officials argued that Russia had no cause for retribution now, noting that Moscow’s ordering of U.S. diplomatic cuts last month was premised on bringing the two countries’ diplomatic presences into “parity.”

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

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 forced closures are the latest in an intensifying exchange of diplomatic broadsides.

In December, President Barack Obama kicked out dozens of Russian officials and closed two Russian recreational compounds. Russian President Vladimir Putin withheld from retaliating. The next month, Trump took office after campaigning on promises to improve U.S.-Russia ties.

But earlier this month, 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 its embassy and consulate staff down to 455 personnel, from a level hundreds higher.

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. last month temporarily suspended non-immigrant visa processing for Russians seeking to visit the United States and resumed it Friday at a “much-reduced rate.”

The U.S. had also said it would stop conducting visa interviews at its Russian consulates, leaving the Embassy in Moscow as the only option. But a State Department cable sent to overseas U.S. diplomatic posts and obtained by The Associated Press on Friday said the U.S. was considering whether, with its reduced footprint, it might be able to resume limited interviews at the three consulates, in St. Petersburg, Yekaterinburg and Vladivostok.

Even before the cuts at the U.S. mission were announced, typical waiting time for visa applicants in Russia to be interviewed was longer than a month.

Nadezhda Sianule planned to attend her daughter’s wedding in the United States in mid-September and got an appointment in July to be interviewed Thursday. Now these plans are in disarray.

“I came yesterday and they said that I’m not on the list. They said that the old lists have been canceled,” Sianule said Friday morning outside the U.S. Embassy.

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