(Reuters) - A U.S. federal judge on Tuesday struck down a Mississippi law that bans most abortions after 15 weeks, ruling that it “unequivocally” violates women’s constitutional rights.

The law, considered one of the most restrictive in the country, was passed in March. It had already been put on hold by U.S. District Judge Carlton Reeves after the state’s lone abortion clinic, Jackson Women’s Health Organization, immediately sued.

Under U.S. Supreme Court precedent, states may not ban abortions before a fetus is viable, and the medical consensus is that viability typically begins between 23 and 24 weeks, Reeves wrote on Tuesday.

The judge acknowledged feeling “frustration” that Mississippi lawmakers passed the statute even though similar bans in other states have also been thrown out by federal courts.

“The real reason we are here is simple. The state chose to pass a law it knew was unconstitutional to endorse a decades-long campaign, fueled by national interest groups, to ask the Supreme Court to overturn Roe v. Wade,” Reeves wrote, referring to the landmark 1973 U.S. Supreme Court case that established a legal framework for abortion.

“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,” he added.

Governor Phil Bryant was traveling and was not immediately available to comment, according to his office. The state attorney general’s office, which defended the law in court, did not immediately comment on the ruling.

The decision effectively invalidates a similar 15-week ban in Louisiana, which was set to take effect only if the Mississippi law survived a court challenge.

“Today’s decision should be a wake-up call for state lawmakers who are continuously trying to chip away at abortion access,” Nancy Northup, president and CEO of the Center for Reproductive Rights, which filed the lawsuit on behalf of the abortion clinic, said in a statement.

Abortion rights advocates have warned that the Roe precedent could be vulnerable following the October confirmation of Supreme Court Justice Brett Kavanaugh, who is widely seen as an abortion foe.

Other states have sought to install severe restrictions in the hope of provoking a legal fight at the nation’s top court. The Republican-controlled Ohio House of Representatives last week approved a measure that would ban abortions at six weeks, while Iowa’s law banning abortions after a fetal heartbeat is detected is tied up in a court battle.