MEXICO CITY (Reuters) - Mexico’s highest court on Thursday overturned a contentious new security law aimed at regulating the long-time use of the military against drug cartels, a day after the president-elect’s team said it was impossible to pull troops from the streets.

Nine of 11 Supreme Court justices vetoed the measure, which President Enrique Pena Nieto sent to the court for constitutional review after signing it in December.

The law intended to set out the rules under which armed forces can target organized crime, formalizing former president Felipe Calderon’s deployment of the military to the streets some 12 years ago. An estimated 170,000 people have died in the ensuing conflict and thousands more have gone missing.

Human rights groups warned the law could open the door to abuses by the military, already accused of human rights violations.

The nine judges said Congress does not have the authority to legislate on “domestic security.” They called the law “unconstitutional” and said only the executive branch can dispatch troops.

President-elect Andres Manuel Lopez Obrador, who takes office Dec. 1, has vowed to radically alter Mexico’s strategy to fight violence, including pardoning low-level drug offenders and addressing root causes such as poverty.

Alfonso Durazo, Lopez Obrador’s future security minister, said at a press conference on Wednesday “there is no way” to withdraw armed forces from the fight against organized crime, because they are more trustworthy and capable than the police.

He added that the government would propose forming a National Guard that would take over the army’s role half-way into Lopez Obrador’s six-year term. The body would comprise 50,000 people from the army, navy and federal police.

Senator Mario Delgado, a leader of Lopez Obrador’s National Regeneration Movement (MORENA), said the party next week will present an initiative to reform the constitution and allow a future National Guard to patrol the streets.

The opposing National Action Party (PAN) rejected the plan.

“Lopez Obrador’s proposal completely abandons the civil path and opts for a military proposal,” said party president Marko Cortes.