Mexican soldiers look up toward the president as they ride past the National Palace on Sept. 16, 2016, during the annual Independence Day military parade in Mexico City's main square, known as the Zocalo. (Rebecca Blackwell/AP)

Shortly after taking office in December 2006, President Felipe Calderón sent soldiers into his home state of Michoacan, the beginning of a national effort to crack down on Mexico’s drug cartels. Soldiers were supposed to patrol rough corners of the country temporarily — until the cartels were crushed and dilapidated police forces were properly trained and equipped.

Eleven years later, soldiers are still combating organized crime, even as violence remains widespread and accusations of human rights abuses mount against the armed forces.

A bill under debate in the Mexican Senate could help keep the soldiers in the streets for the foreseeable future. The Internal Security Law would enshrine the role of the Mexican military in law enforcement and could expand it.

Proponents say the law would resolve potential legal problems surrounding the deployment of the military for domestic crime-fighting. Mexico’s constitution limits the use of the military in domestic situations in peacetime. But the forces are needed to fight crime because of local police forces’ incompetence and corruption, supporters say.

Opponents fear the new measure will risk militarization of the country, weaken civilian oversight and offer fewer incentives for local politicians to fix their police forces. Critics include Mexican opposition politicians and the U.N. high commissioner for human rights, Zeid Ra’ad al Hussein, who recently called the legislation “deeply worrying.”

“Instead of improving civilian institutions in a democratic way, they’ve opted for military force,” said Michael Chamberlin, deputy director of the Fray Juan de Larios Human Rights Center in the northern city of Saltillo. The law “gives authority to the army to continue acting the way it has, but without the need to explain anything to anyone.”

The governing Institutional Revolutionary Party (PRI) rammed the Internal Security Law through the lower house of Congress on Nov. 30. In an especially acrimonious session, the PRI and its allies closed committee meetings, limited debate and advanced a final version of the bill so hastily that critics contended that lawmakers had no opportunity to read what they were voting on.

The bill sets out parameters for the president to authorize military action. It establishes a legal framework for federal forces assuming public security roles such as capturing cartel kingpins, operating highway checkpoints and, increasingly, confronting powerful mafias siphoning fuel from pipelines.

“The problem is that we don’t have a procedure for how the president should act to restore order,” said Sen. Roberto Gil, a supporter of the bill and member of the right-leaning National Action Party.

The PRI and its allies are just shy of a majority in the Senate and are expected to get help from conservatives such as Gil to pass the bill. It could be approved this week.

The push to approve the law comes as violence convulses the country. This year is on pace to be the most murderous since such statistics were first kept in 1997.

Critics have expressed concern about various aspects of the proposed law. Zeid, the U.N. human rights chief, said in a statement that the measure did not contain adequate controls and oversight of the military while it was engaged in law enforcement.

It also “risks weakening incentives for the civilian authorities to fully assume their law enforcement roles,” he said.

The government’s continued dependence on the army reflects the poverty of policing in Mexico, where many forces lack equipment, training and adequate salaries.

The bill’s opponents also have assailed what they call its vagueness and the possibility that it will result in a lack of transparency about military operations. The measure allows the military to assist in “internal security,” and critics fear that could be defined as almost any situation.

The push for the law comes seven months ahead of the 2018 presidential election, which polls show is shaping up as a close contest between several candidates.

The law would permit the army to respond to civil disturbances such as street protests, which have occurred after past elections. “This could become a political instrument of the party in power,” allowing it to possibly interfere with the vote in opposition-leaning districts, said Carlos Bravo Regidor, professor at the Center for Teaching and Research in Economics.

Proponents of the bill reject such scenarios and insist that the law does not erode human rights.

PRI lawmaker César Camacho Quiroz said that “we have made sure, stating explicitly” that the law will not apply to peaceful demonstrations focused on social or political issues. Proponents also say the law requires governors to partially cover the costs of sending soldiers into their states, and sets out objectives and timelines for operations.

Mexico’s military has lobbied for such a law, arguing that soldiers are deployed for domestic security roles but lack a legal framework under which they can operate — part of the reason for rising human rights complaints against them, they contend.

Polls consistently show the army ranking as Mexico’s most trusted institution — the product of soldiers often providing relief during natural disasters such as hurricanes or floods. Observers say the army risks that reputation with its work in the crackdown on organized crime.

A report from the Washington Office on Latin America, a human rights think tank, found impunity the norm in cases of human rights abuses committed by the Mexican military. Of 505 investigations opened by the attorney general’s office into accusations against soldiers, only 16 convictions resulted.

Chamberlin, the human rights advocate, said local politicians have failed to improve the police for several reasons, including a lack of resources and their own political needs. Local officials are generally barred from reelection, prompting them to promote “ornamental” projects that can be completed quickly and overlook long-term issues such as policing, he said.

“There’s corruption, too,” he said. “A proper police force could act against them. That isn’t in their interest.”