The capital has allowed the procedure within three months of conception but it is prohibited throughout the rest of the country
Mexico's Supreme Court rejected a proposal to legalise abortion on Wednesday but suggested more debate on the issue in the country boasting the world's second-largest Catholic population.
Justices of the court's first chamber - which deals with criminal issues - voted three to one to reject an initiative to declare as unconstitutional two laws that ban abortion and drastically limit the procedure for medical reasons.
Although the capital Mexico City has allowed abortion within three months of conception since 2007, it is prohibited throughout the rest of the country except in cases in which pregnancies endanger mothers' lives.
The legalisation initiative, presented by Supreme Court member Arturo Zaldivar, aimed to extend sanctioned abortions to women with other medical problems and declare prison sentences for illegal abortions unconstitutional.
Penalties range up to five years.
The penal code represents "real discrimination against women's health," Zaldivar said during arguments over the measure.
His initiative also proposed introducing graduated penalties for illegal abortions determined by the stage of pregnancy.
More than 2,000 women died from abortions conducted in unsanitary conditions between 1999 and 2013 due to the current ban, Zaldivar argued.
Some 200 anti-abortion activists and hundreds more reform supporters noisily demonstrated outside the building during the debate.
The Supreme Court rejected the measure but acknowledged the issue is an important one facing the country and suggested drafting a new proposal for debate in the coming months.