By DAVID E. SANGER and EDWARD WONG, New York Times–

Hours before he pulled American diplomats from Venezuela, Secretary of State Mike Pompeo confronted the growing crisis in the country by blaming not only its embattled ruler, but also a broader menace: socialism.

His diagnosis echoed President Trump’s line of attack against potential Democratic rivals in 2020, and there is little question that the far-left ideology of Venezuela’s government shares some responsibility for the dysfunction that has thrown the country into chaos.

But Mr. Pompeo’s broadside against President Nicolás Maduro also obscured the fact that the United States had just about run out of options to achieve its goal in Caracas: a peaceful change of power.

“Nicolás Maduro promised Venezuelans a better life in a socialist paradise,” Mr. Pompeo said on Monday. “And he delivered on the socialism part, which has proved time and time again is a recipe for economic ruin.”

The United States has imposed sanctions to cut off Venezuela’s oil revenues and against banks, including one in Russia. It has canceled the visas of officials in the Maduro government and talked to nations about taking in others who might seek asylum or a safe haven. And it maintains that “all options are on the table” — even while assuring allies that military intervention, of the kind that the United States has had a long and ugly history of carrying out in Latin America, is not really being considered.

But Mr. Maduro remains, to the surprise of many in the Trump administration.

Now, Mr. Trump faces the same problem that his predecessor, Barack Obama, confronted after saying in 2012 that President Bashar al-Assad of Syria would be severely punished if he used chemical weapons — the dangers of making a tough declaration that the United States is unwilling or unable to enforce.

“It’s a tough situation with no clear end in sight, and momentum appears to be moving in the wrong direction,” said Fernando Cutz, a former senior White House official on Latin America policy in the Obama and Trump administrations.

The move to vacate the United States Embassy in Caracas was a significant setback for the Trump administration. American officials had previously vowed to keep diplomats in Venezuela to legitimize Juan Guaidó, the opposition leader who declared himself the interim president in January.

The decision was difficult for Mr. Pompeo to explain.

The diplomats in Caracas “have done great work,” Mr. Pompeo said in a television interview on Tuesday in Houston, where he was attending an energy conference. “But it was time for them to come back. Their security is always paramount. And it’s just gotten very difficult.”

Mr. Pompeo announced the decision just minutes before midnight on Monday. The withdrawal, he said on Twitter, reflected Venezuela’s “deteriorating situation” and the belief that the American diplomats’ presence “has become a constraint on U.S. policy.” There was no mention of those concerns just hours earlier at a briefing on Venezuela to reporters at the State Department.

Secretary Pompeo

@SecPompeo

The U.S. will withdraw all remaining personnel from @usembassyve this week. This decision reflects the deteriorating situation in as well as the conclusion that the presence of U.S. diplomatic staff at the embassy has become a constraint on U.S. policy.

Mr. Maduro has held onto power and the support of his military leaders, despite the hopes and expectations of opposition leaders and the Trump administration.

Last month, Mr. Guaidó and American officials tried to persuade senior military officers to abandon Mr. Maduro by sending convoys with food and medical supplies overland into Venezuela, forcing a choice between blocking the aid for civilians or defecting from the army. They chose to block the convoys, reinforcing Mr. Maduro’s rule and weakening the efforts of Mr. Guaidó and the United States.

Conditions in Venezuela have degenerated. Much of the country, including Caracas, has been without power for five days. Even before the blackouts, the country was struggling with violence, food shortages and the collapse of its public health system. The blackouts worsened the situation at barely functioning hospitals, where patients begged for care.

Brett Bruen, a former American diplomat who has worked in Venezuela, said Mr. Pompeo’s announcement of the embassy withdrawal appeared hasty and lacked the details needed to clarify United States policy and action.

“What is our message to Guaidó’s supporters?” Mr. Bruen said. “What should American citizens in the country do? How should other countries respond?”

He added that the Trump administration appeared to be invoking the potential use of military force much too frequently — including in Mr. Pompeo’s announcement — saying it played into Mr. Maduro’s warnings that the United States was the muscle behind the attempted coup.

“This continues to be my main area of concern,” Mr. Bruen said. “They are using this bellicose rhetoric pretty cavalierly. It strengthens Maduro’s position without seeming to be part of an escalation strategy.”

Elliott Abrams, the special representative on Venezuela, maintained on Tuesday that the United States was continuing to look at all options, including military intervention, but said additional economic sanctions on financial institutions would be announced first.

He also said the United States was continuing to talk to China about complying with the American-led isolation of Venezuela, and expressed concerns about Turkey’s refusal so far to recognize Mr. Guaidó’s leadership.

Mr. Abrams, who was named the special representative in late January, has a contentious history in promoting forceful and violent United States intervention in Latin America. His new role has fueled suspicions among some liberal members of Congress and analysts about the direction of Trump administration actions on Venezuela.

In January, after what opposition leaders and American officials called a sham election, Mr. Maduro was sworn in for a second presidential term. In his first term, he had overseen a government widely believed to be corrupt and the country’s economic collapse.

On Jan. 23, Mr. Guaidó, the head of the National Assembly, invoked the country’s Constitution to declare himself the interim president. His presidency was recognized by the Trump administration, Canada and many Latin American nations.

Mr. Maduro accused the United States of plotting to overthrow him and cut diplomatic ties. The Pentagon put 50 Marines on alert in case the United States needed to deploy a military force to the embassy in Caracas. At the time, Mr. Pompeo also decided to withdraw most personnel from the embassy but asked a handful to stay and maintain ties with the Guaidó government.

“Either you stand with the forces of freedom or you’re in league with Maduro and his mayhem,” he said at a United Nations Security Council meeting in January. Soon afterward, some European nations announced they were recognizing Mr. Guaidó. As of this week, more than 50 governments have recognized him.

Mr. Trump has tried to push Mr. Maduro out by pressuring his government through sanctions. Most notably, the Treasury Department announced in late January what is effectively an oil embargo. That served as the peak of the Trump administration’s use of its major diplomatic and economic tools, said Mr. Cutz, the former senior White House adviser.

“The question is: Will it be enough to end the loyalty that exists between senior officials and Maduro?” Mr. Cutz said at the time. “If they don’t abandon him, things get tricky.”

After Mr. Pompeo’s order for all American diplomats to leave Caracas, it was unclear what would happen to the United States Embassy. A “protecting power” would watch over it, Mr. Abrams said on Tuesday, but exactly who has that authority is uncertain.

He said the diplomats’ departure would result in some difficulties, including being able to remain in touch with Venezuelan officials and citizens.

Daniel Victor contributed reporting from Hong Kong.