CARACAS, Venezuela — The State Department said on Wednesday that it was imposing travel restrictions on Venezuelan officials whom it considered to be responsible for human rights abuses during recent antigovernment protests.
The move followed an embarrassing episode for Washington in which it tried and failed to get custody of a former Venezuelan general who is wanted in the United States on narcotics charges. The episode produced a propaganda victory for President NicolÁs Maduro of Venezuela, a leftist who often accuses Washington of plotting against him.
The former general, Hugo Carvajal, was arrested last week in Aruba at the request of the United States. Venezuela had designated Mr. Carvajal as its consul general to Aruba, but Aruban officials said he did not have diplomatic immunity because they had not accepted his appointment to the post.
However, the Netherlands, which handles some affairs for Aruba, its former colony, ruled that Mr. Carvajal had immunity and ordered him released. The unexpected development caught American diplomats flat-footed.
Mr. Carvajal returned home on Sunday to a hero’s welcome from Mr. Maduro, who said the drug-trafficking charges against him were fabricated.
Indictments filed in federal courts in New York City and Miami charge that Mr. Carvajal was on the payroll of Colombian narcotics traffickers and that he invested in and coordinated the transportation of drug shipments.
In a written statement on Wednesday about the new travel restrictions, the State Department said Venezuelan security forces had responded to recent protests with arbitrary detentions and excessive force.
“We have seen repeated efforts to repress legitimate expression of dissent through judicial intimidation, to limit freedom of the press and to silence members of the political opposition,” Marie Harf, the department’s deputy spokeswoman, said in the statement.
A senior State Department official said on Wednesday that the Venezuelans who would be barred from entering the United States included cabinet officials, agency heads, mayors, judges and members of the military, the national guard, the police and the intelligence services.
The names of the officials affected by the restrictions were not released. The State Department statement said that was because of confidentiality rules regarding visas.
ElÍas Jaua, the Venezuelan foreign minister, condemned the American action with several posts on his ministry’s Twitter account, calling it “a desperate cry against a changing world.”
Similar visa restrictions are included in legislation proposed in Congress that would also impose financial penalties against some Venezuelans.
The office of Senator Bill Nelson, Democrat of Florida, who is a co-sponsor of the legislation, said that 24 high-ranking Venezuelan officials were affected by Wednesday’s action.
The antigovernment protests in Venezuela began in February and lasted for several weeks. They often turned violent, and the government said more than 40 people had died in incidents related to the protests, with both demonstrators and soldiers among the victims.