Mexico's Supreme Court failed Wednesday to overturn a draconian anti-abortion law adopted by the northwestern state of Baja California.

After three days of debate, the justices opposing the measure fell one vote short of the eight needed to declare the legislation unconstitutional.

The state law establishes an obligation to protect life from the moment of conception and treats unborn children as persons. The legislation was challenged in court by the Baja California public ombud's office.

The motion defeated Wednesday, proposed by high court Justice Jose Fernando Franco Gonzalez-Salas, would have invalidated the Baja California law and similar measures enacted by 17 other Mexican states.

Gonzalez-Salas said those laws contravene the secular nature of the Mexican state and have no basis in the country's constitution.

Though the Baja California law was left standing, Wednesday's outcome does not set any binding precedent regarding the 17 other state laws, one of which is already before the Supreme Court.

Pro-choice and pro-life activists mounted dueling protests in front of the Supreme Court during the days the judges spent pondering the Baja California law and the debate has also raged in the media.

President Felipe Calderon and first lady Margarita Zavala spoke out publicly in defense of the anti-abortion measure.

Mexico City, governed by the center-left PRD, is the only one of Mexico's 32 jurisdictions where abortion is legal, provided the procedure is performed within the first 12 weeks of pregnancy.

The capital's decision to decriminalize abortion spurred conservative Catholics - the base of Calderon's PAN party - in 18 states to press for laws protecting life from conception.

In the central state of Guanajuato, women who have abortions can be sentenced to prison.

Calderon has asked the Senate to scrap a commitment Mexico made when it signed the Pact of San Jose on Human Rights in 1981 to not take on the obligation of enacting legislation to protect life from conception.

The president contends that a withdrawal from the Interpretive Declaration of the San Jose Pact would allow Mexico to endorse a "commitment to the right to life as a legal right protected under Mexican law," his office said this week in a statement.

Mexico signed the treaty in 1981 with the provision that becoming a signatory "does not constitute an obligation to legislate to protect life" from conception and made it clear that "States reserve the right to have exceptions in their legislation, such as is the case with determining responsibility in abortion cases."