Updated

A closely divided senate has passed legislation to overturn an amnesty for human rights crimes by the military during Uruguay's 1973-85 dictatorship, moving to overrule voters who upheld the law twice.

The measure passed 16-15 late Tuesday after a 12-hour debate and now goes to the lower house for minor changes. It could become law by May 20 — the day Uruguay honors political prisoners who were kidnapped and killed during the junta's crackdown on leftists.

Once enacted, the legislation would allow prosecutions for crimes against humanity that were committed during Uruguay's "dirty war," fulfilling a key goal of President Jose Mujica and the leftist wing of the governing Broad Front coalition.

During the debate, Sen. Oscar Lopez Goldaracena of the Broad Front called an end to the amnesty necessary for "removing the rules of impunity and granting rights to the citizenry."

Opposition parties on the right and Uruguay's retired military angrily opposed the move, and the issue roiled the governing coalition as well, challenging a common political ground this small South American nation has built through nearly a quarter-century of democracy.

"It's clear now what kind of morality moves our enemies. It's profoundly immoral, antidemocratic," said retired Col. Jose Carlos Araujo, spokesman for the Liberty and Harmony forum of former military officials. "They don't even respect the decisions of the people."

Uruguay has largely avoided probing old wounds from the era in which numerous South American governments cracked down hard on leftists.

The military amnesty law — passed a year after a 1985 amnesty for crimes by leftists — has protected most uniformed officials. The measure adopted by the senate would undo only the military amnesty, leaving intact the amnesty for leftist guerrillas.

A peace commission found in 2003 that 175 political activists were killed during Uruguay's 12-year dictatorship, including 26 in clandestine torture centers. Previously, only rights crimes considered to be beyond the military amnesty's scope — such as murders outside Uruguay — have been prosecuted, leading to prison terms for about a dozen officials.

Mujica, who supports an end to the military amnesty, is a 75-year-old former Tupamaro guerrilla leader who endured torture and solitary confinement during nearly 15 years in prison before he was freed due to the 1985 amnesty for leftists.

He was elected president with a 53 percent majority in 2009 — the same election that saw 52 percent of voters cast ballots to uphold the military amnesty. In a referendum two decades earlier, 54 percent favored amnesty.

Abuses were committed by both sides during the "dirty war," making the amnesty question a touchy one. An armed uprising by the Tupamaros that began in 1963 against democratically elected governments resulted in dozens of killings, kidnappings, robberies, arsons and other attacks before they were defeated a decade later.

All three opposition parties — the center-right National Party, the right-wing Colorados and the Independent Party — argued against overturning the amnesty.

Colorado Sen. Ope Pasquet disputed the governing coalition's argument that Uruguayans voted in fear to uphold the amnesties.

"How would they be fearful in complete democracy? To think that they voted in fear is an insult to the people," he said during the debate.

National Party Sen. Francisco Gallinal said eliminating the amnesty "would mean a slap in the face" to the public's will.