Mexico's top court ruled on Tuesday that military officials who committed crimes against civilians should be tried in civil courts, possibly clearing the way for sterner prosecutions against military misconduct in the country's drug war.

In an 8-2 decision, the Supreme Court deemed unconstitutional a section of the military code of justice the armed forces have relied on to argue that cases should be tried in their own courts.

The justices ruled that an article of the code failed to offer victims of military human rights abuses recourse to federal justice.

However, other similar rulings will be needed to set a precedent that would change the law.

"This decision is not obligatory until four other cases confirm the court's decision," said Victor Rojas, director of the Ibero-American University's law school in Mexico City.

Allegations of human rights abuses have plagued the government of Felipe Calderon, who in 2006 sent in the army to tackle the warring drug cartels. Nearly 60,000 people have died since then as violence spiraled.

As the bodies piled up, so did allegations of military misconduct. The Mexican armed forces opened nearly 5,000 investigations into criminal wrongdoing between 2007 and 2012, but only 38 ended in sentencing, according to Human Rights Watch.

But the military has been unwilling to bend on the issue, defending its right to have soldiers tried behind closed doors.

Advocates, already cheered by a similar but less broad Supreme Court ruling earlier this month, said the judgment could lead to substantive reforms of opaque military practices.

"It's a huge step by the court in striking down the military's central argument for fighting against civilian investigations," said Human Rights Watch's Mexico analyst Nik Steinberg.

Tuesday's case was brought to the court by the family of Bonfilio Rubio Villegas, who was shot dead by a soldier at a military checkpoint in the state of Guerrero in 2009.

The next of the 27 remaining similar cases will be tried on Monday, a court spokesperson said.