BOGOTÁ, Colombia — The Venezuelan government said Wednesday that it would hold a snap presidential election on April 22, putting the unpopular administration of President Nicolás Maduro in the hands of voters at a time when most top challengers have been barred from running.

The announcement was made by Tibisay Lucena, the president of the country’s electoral commission, who said the date had been chosen after negotiations with opposition politicians had failed to reach an agreement about how to conduct the election fairly.

The election will allow Venezuelans to “freely decide their fate,” she said. “We are committed, as always, to our constitutional task, to guarantee the right conditions so that democratic differences are settled through an efficient, transparent and balanced vote.”

It is unclear whether opposition parties will participate in the election, in which Mr. Maduro will seek another six-year term. Venezuela is now governed by a Constituent Assembly composed of Mr. Maduro’s allies; creation of the assembly sidelined the opposition-controlled Congress and led the country’s closest neighbors to warn that a dictatorship was being established.

Since then, the government has consolidated power further, ordering potential rivals jailed or barring them from running for office. In December, the Constituent Assembly decreed that political parties that wanted to run must have participated in previous elections.

Last year, the three biggest opposition parties boycotted local elections on grounds that they would not be fair. Members of Mr. Maduro’s United Socialist Party won in a landslide.

On Wednesday, the government said campaigning would be allowed only between April 2 and April 19, a window of less than three weeks.

Dimitris Pantoulas, a political analyst and electoral expert in Caracas, the capital, said the usual window for an election was four to six months, allowing international observers to participate.

While Mr. Pantoulas said Venezuela’s electoral commission had been considered fair in the past, its credibility crumbled last year when the software company that had installed voting systems said the results of the Constituent Assembly election had been tampered with.

Experts say the top challenger to Mr. Maduro is Henry Ramos Allup, the 74-year-old former leader of the National Assembly. His party, Democratic Action, is still qualified to run, but he has not said whether he will do so.

But Mr. Pantoulas said the opposition’s strength in past elections had been its ability to unite under a candidate of its choosing, which is impossible now with so many popular politicians barred or jailed.

“The real power is being able to choose your rival,” Mr. Pantoulas said of the government’s crackdown against opposition members.

Mr. Maduro had been under increasing international pressure to hold elections since protests last year in which more than 100 people died. The topic came up again on Tuesday, during Secretary of State Rex W. Tillerson’s visit with President Juan Manuel Santos of Colombia in Bogotá.

“Our only objective is to see Venezuela return to its Constitution, return its duly elected assembly, to hold free and fair elections,” Mr. Tillerson said.

Mr. Santos called Mr. Maduro a dictator. “Maduro would never accept free and transparent elections as he knows he would lose,” he said.