The bill was approved 46-19 on Tuesday and will take effect after it receives the promised signature by Mayor Marcelo Ebrard.
It applies only to the federal district, some 600 square miles (1,547 square kilometers) in the center of the metropolis of Mexico City. The federal district functions like a state.
The Archdiocese of Mexico is expected to make a statement on Sunday.
Abortions had only been legal in cases of rape, presumed fetal defects or in cases endangering the mother’s life. The new law will permit hospitals to perform them during the first trimester and the measure would open the door for abortion clinics. Parental consent will be required for girls under 18.
Pro-lifers have said they will appeal the decision to the Mexican Supreme Court.