The United States has seized control of three Russian diplomatic posts after confirming the Russians had complied with the Trump administration's order to leave within two days, officials said.

Workers were seen hurrying to shut Russia's consulate in San Francisco earlier on Saturday, a day after black smoke rose from a chimney at the building.

Russia had been told on Thursday to close its San Francisco consulate, and annexes in New York and Washington, amid escalating tensions between Washington and Moscow.

The order to leave the consulate and an official diplomatic residence in San Francisco - home to a community of Russian immigrants and technology workers - worsened an already tense standoff between Washington and Moscow, even for those who have long monitored activities inside the closely monitored building.

Saturday's closures were protested by the Russian government, who summoned a US diplomat in Moscow to protest what it called plans to conduct searches in Russia's trade mission complex in Washington, DC, which was also closed.

The US State Department said inspections were "carried out to secure and protect the facilities and to confirm the Russian government had vacated the premises", an official said in a statement, adding that Russia had been forwarned about the inspections.

Russia's foreign ministry also posted video on Facebook that it said showed FBI agents inspecting the consulate general building in San Francisco.

There was no additional comment from the US about whether the FBI was involved in the inspections. The State Department declined to answer additional questions about whether the premises might be searched for intelligence-gathering purposes now that the Russians have left.

'Like a hammer'

Rick Smith, a veteran FBI special agent, said the closures represents "the realisation by the administration that Russians have been involved in intelligence operations at this consulate, which they have been doing for decades".

Smith, who had also previously headed the bureau's Russian counterintelligence squad in San Francisco, added that "it's almost 50 years of history and part of a tit-for-tat, but this is more like a hammer".

In a statement posted on Facebook, the Russian consulate said the closure would hurt both Russian and American citizens needing its services.

The consulate issued more than 16,000 tourist visas to American citizens last year, it said.

The US also plans to search apartments in San Francisco used by Russian diplomats and their families, she said - those families would have to vacate their homes for 10 to 12 hours so officials could search.

An official at the Russian consulate tells fire fighters there is no problem after smoke was seen coming from the rooftop of the San Francisco building [Eric Risberg/AP]

Fire department turned away

The US State Department did not comment on the black smoke coming from the embassy in San Francisco on Friday, which triggered a visit from the San Francisco Fire Department.

Firefighters who arrived at the scene were turned away by consulate officials who came from inside the building.

An Associated Press news agency reporter heard people who came from inside the building tell firefighters that there was no problem and that consulate staff were burning unidentified items in a fireplace.

Mindy Talmadge, a spokeswoman for the San Francisco Fire Department, said the department received a call about the smoke and sent a crew to investigate, but determined the smoke was coming from the chimney.

Talmadge said she did not know what they were burning on a day when normally cool San Francisco temperatures had already climbed to 95 degrees by noon.

"It was not unintentional. They were burning something in their fireplace," she said.

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.

In addition to Consul Sergey Petrov, the consulate's website showed 13 other Russian officials working at the San Francisco post.

When approached Friday, Petrov declined to answer questions about the closure or about what was being burned inside.