CARACAS, Venezuela — Opposition leaders in Venezuela hoped the offer would be impossible to refuse: amnesty for military officials in exchange for their political support.

The country’s military had been a bulwark for President Nicolás Maduro even as the country spiraled deeper into an economic and humanitarian crisis. The armed forces have a lot to lose if the opposition’s weekslong quest to oust him succeeds: A new government could hold them accountable for well-documented allegations of torture, extrajudicial killings, arbitrary detentions and graft.

Opposition leaders view their effort to entice senior military officials to abandon Mr. Maduro as crucial to their plan to take over the government until new elections can be held. “This is not about twisting arms, but rather about extending out our hand,” the opposition’s leader, Juan Guaidó, said during a rally on Jan. 23.

But, some critics say, facilitating a transition to democracy in the short term should not come at the expense of a chance to put perpetrators of serious crimes to justice in the long run. Human rights activists, and Venezuelans who have been victims of abuse, say the amnesty bill at the heart of Mr. Guaidó’s strategy is immoral and unlawful.