Mexico's Supreme Court ruled unanimously to decriminalise abortion on Tuesday.
The decision specifically annulled parts of the penal code in Coahuila, a northern Mexican state bordering Texas, where women and others who performed abortions faced prison sentences.
Abortion is currently only legal in Mexico City and the states of Oaxaca, Hidalgo and Veracruz. Another 28 states still penalise it.
While the decision will not legalise abortion across the country and only takes immediate effect in Coahuila, it does set a historic precedent.
The judges determined that women should have the right to choose early on in a pregnancy and that abortion could not be limited in specific cases until 12 weeks, according to a statement published on the court's website.
More details are expected from the court decision.
The unanimous vote of ten judges means the decision is binding on all Mexican judges at the federal and local levels, the court said.
Supreme Court President Arturo Zaldívar hailed a "historic day for all women, especially for the most vulnerable" adding that a woman would "ever again" be in prison for "exercising her rights."
"We celebrate this ruling, a reflection of a historic struggle by the feminist movement for legal, safe and free abortion," said reproductive rights NGO GIRE in a statement.
"We hope that throughout the country women and people with the ability to carry a child have the conditions and freedom to determine their reproductive destiny."
Abortion still remains a controversial topic in Mexico which has the second-largest Roman Catholic population globally.
The decision also comes after the US border state of Texas passed a law banning abortion as soon as a fetal heartbeat is detected.