(CNN) A federal judge on Tuesday blocked a Mississippi state law that sought to forbid most abortions after 15 weeks of pregnancy, writing a sharply worded opinion with implications for states weighing similar measures.

Gov. Phil Bryant signed H.B. 1510, also known as the Gestational Age Act , in March, pledging his "commitment to making Mississippi the safest place in America for an unborn child."

The law made exceptions only for medical emergencies or cases in which there's a "severe fetal abnormality." There were no exceptions for incidents of rape or incest.

The next day, the sole facility providing abortion services in Mississippi sued to prevent the law from taking effect, setting off months of legal challenges culminating in Tuesday's ruling.

US District Judge Carlton Reeves of Mississippi's Southern District, who was appointed by President Obama, wrote that the law "unequivocally" infringes upon a woman's 14th Amendment due process rights and defies Supreme Court precedents.

Citing evidence that viability begins at between 23 and 24 weeks, Reeves wrote that "there is no legitimate state interest strong enough, prior to viability, to justify a ban on abortions."

"The state chose to pass a law it knew was unconstitutional to endorse a decadeslong campaign, fueled by national interest groups, to ask the Supreme Court to overturn Roe v. Wade," Reeves wrote. "This court follows the commands of the Supreme Court and the dictates of the United States Constitution, rather than the disingenuous calculations of the Mississippi Legislature."

Furthermore, he called the Legislature's professed interest in women's health "pure gaslighting," pointing to evidence of the state's high infant and maternal mortality rates.

"Its leaders are proud to challenge Roe but choose not to lift a finger to address the tragedies lurking on the other side of the delivery room, such as high infant and maternal mortality rates," he wrote in a footnote.

"No, legislation like H.B. 1510 is closer to the old Mississippi -- the Mississippi bent on controlling women and minorities."

The governor's office did not reply to a request for comment. Proponents of the bill previously said the law would do what's best for women.

"Beyond the obvious debate of trying to save the lives of innocent babies, there is the often less discussed issues that relate to the health of the mother who receives an abortion," Mississippi State Rep. Dan Eubanks said in March after Bryant signed the bill into law.

"When did looking out for the life, health and overall well-being of a child or its mother start getting labeled as extreme in this country?"

Critics of the law called it one in a string of efforts to diminish access to abortions in an already restrictive state.

Mississippi is the only state in the country that requires physicians who perform abortions to be board-certified or board-eligible obstetrician-gynecologists. It also requires in-person counseling and a 24-hour waiting period before receiving an abortion, which means women must make repeat trips to the facility, a fact that's especially burdensome for those living outside Jackson.

The Center for Reproductive Rights, which sued on behalf of Jackson Women's Health Organization, said the opinion reaffirms other courts' decisions that struck similar bans on abortions before viability.

"Our victory today means that women in Mississippi will maintain the ability to make their own decisions about whether and when to terminate a pregnancy," said Nancy Northup, president and CEO of the Center for Reproductive Rights.

Follow CNN Health on Facebook and Twitter See the latest news and share your comments with CNN Health on Facebook and Twitter.

Reeves noted that Mississippi already has a trigger law that will ban abortions in the event Roe v. Wade is overturned. Until then, he said Roe is the controlling law in the United States and expressed frustration that the Legislature passed 1510 knowing that it could face legal challenges at taxpayers' expense.

He also noted what he called the "sad irony" of men like him deciding women's reproductive rights, recalling what the lawyer for Jane Roe argued to the Supreme Court in 1971: "A pregnancy to a woman is perhaps one of the most determinative aspects of her life."

"The fact that men, myself included, are determining how women may choose to manage their reproductive health is a sad irony not lost on the court," he wrote.

"As a man, who cannot get pregnant or seek an abortion, I can only imagine the anxiety and turmoil a woman might experience when she decides whether to terminate her pregnancy through an abortion. Respecting her autonomy demands that this statute be enjoined."