WASHINGTON — The Trump administration's decision to recognize Venezuela's opposition leader as president has thrust the staff of the U.S. embassy in Caracas into a tense and unpredictable showdown between an authoritarian regime and the United States.

Diplomats working abroad typically rely on a host government for their safety. But in this unusual case, American diplomats on the ground have orders to defy the regime that controls the country's security forces after Washington threw its weight behind the opposition.

Although the head of the regime that still controls the machinery of government, President Nicolas Maduro, has demanded U.S. diplomats leave the country by Saturday, the Trump administration has chosen to ignore the order. Washington now only recognizes the authority of Juan Guaido, the leader of the National Assembly who on Wednesday proclaimed himself the country's interim president.

Several former U.S. diplomats said they were sympathetic to the decision to back the opposition against a repressive ruler, but they also expressed concern that the move could put the remaining embassy staff in potential jeopardy — especially if the opposition fails to gain the upper hand and more violence erupts.

Venezuelan President Nicolas Maduro speaks to a crowd of supporters flanked by his wife Cilia Flores, Venezuelan Vice-president Delcy Rodriguez, the head of Venezuela's Constituent Assembly Diosdado Cabello, along with other members of the government, during a rally in Caracas on Jan. 23, 2019. Luis Robayo / AFP - Getty Images

"The people in the embassy in Caracas are in a very vulnerable situation and this decision puts them at risk," said a former senior U.S. official, who served during the Trump administration.

"Diplomats depend on host governments for their safety. Now they're no longer safe on the streets or in their homes."

A Democratic congressional aide said there was concern that not enough planning had taken place to manage the consequences of the decision for the foreign service officers in Caracas. "What happens when they no longer have their privileges and immunities?" the aide said.

A day after the Trump administration recognized Guaido as interim president, the State Department announced on Thursday that it was withdrawing non-essential personnel and their families, while leaving a small team in place in Caracas. Officials declined to say how many diplomats would remain, but one official said, "The full range of United States government resources are at the ready to ensure the safety and security of U.S. diplomats and their families."

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

A senior administration official said that embassy security has been bolstered and Pentagon officials said if needed, the U.S. military could stage an operation out of neighboring Colombia. But the State Department said it had no plans to close the embassy.

President Donald Trump and his aides have a track record of making decisions without thorough deliberations among government agencies beforehand. The president has often blind-sided senior diplomats and his own cabinet with abrupt decisions and sharp changes in policy, including his announcement last month to withdraw U.S. troops from Syria. In this case, the decision was prepared in consultation with other governments and members of Congress, the administration official and congressional aides said. Several lawmakers from both parties praised the move.

Still, some current and former diplomats questioned why the bulk of the embassy staff in Caracas was not cut back before the announcement to recognize Guaido. And it remained to be seen if the White House had mapped out a strategy for how it would handle an outcome in which Maduro held on to power with the backing of the military.

"It's not clear they have thought this through, and what happens if this doesn't end the way they expect it to," said the former senior official.

A protracted power struggle could see the Maduro regime, which has harassed and expelled American diplomats in the past, ramping up threats or restrictions against the embassy staff or even placing them under detention. In that scenario, the Trump administration — which has said that all options remain on the table — could be tempted to take military action to protect or rescue the diplomatic staff, former officials said.

In 1989, President George H.W. Bush cited attacks on Americans in Panama, including the killing of a U.S. Marine, as justification for a U.S. military invasion, dubbed "Operation Just Cause," that toppled the country's dictator, Gen. Manuel Noriega.

Rep. Eliot Engel of New York, the Democratic chairman of the House Foreign Affairs Committee, and the panel's ranking Republican, Rep. Michael McCaul of Texas, wrote a letter on Thursday to Secretary of State Mike Pompeo calling on the Trump administration to make the safety of the embassy staff a top priority.

"Regardless of the Administration's policy toward Venezuela, we all agree on the need to keep our diplomats in Caracas safe from harm by making staffing decisions for the U.S. Embassy based on the well-being of these individuals and their families," they wrote.

People look at a burned truck in a street after a protest in Caracas, Venezuela, on Jan. 24, 2019. Carlos Garcia Rawlins / Reuters

Maduro still wielded control of the security services, and there was a danger that he could use that power to intimidate or harm U.S. diplomats, the two lawmakers said.

"Given this potential situation, we want to ensure the safety of our diplomats and not allow it to be compromised in order to reiterate the political point that the United States no longer recognizes Maduro's legal authority."

Venezuelan military leaders on Thursday pledged loyalty to Maduro, in a setback for the opposition. Russia, China and Cuba have also rallied to Maduro, with Moscow denouncing what it called "destructive foreign interference."

A Maduro ally, Diosdado Cabello, head of the country's pro-Maduro Constituent Assembly, warned that the regime could possibly cut electricity to the U.S. embassy.

"They say they don't recognize Nicolas. Okay. Maybe the electricity will go out in that neighborhood, or the gas won't arrive," Cabello said.

But Secretary of State Mike Pompeo said Washington expected the security services to safeguard the safety of Americans in the country, and that the U.S. government stood ready to act if necessary.

"The United States will take appropriate actions to hold accountable anyone who endangers the safety and security of our mission and its personnel," Pompeo said Wednesday.

Mark Feierstein, who helped oversee Latin America policy in the Obama White House, said diplomats posted to Caracas have been working in a fraught environment for years as relations between the two countries have deteriorated. In 2016, the Obama administration weighed possible evacuation plans.

He said the Trump administration had taken a calculated gamble that international pressure, from Washington and other governments, could help tip the scales against the Maduro regime.

The question is whether the opposition can keep up street demonstrations with sufficient intensity to persuade rank-and-file troops — and their commanders in the security forces — to abandon Maduro, said Feierstein, now a senior adviser to the Albright Stonebridge Group consultant firm.

"That's the big question," he said. "The missing piece has been domestic pressure. Will we see protests sustained over a period of time?"