A federal judge has blocked Indiana's ban against aborting a fetus based on its sex, race or disability, a law that was set to go into effect Friday.

Indiana is one of two states with bans on obtaining an abortion based on race, gender or ancestry of a fetus. Gov. Mike Pence signed the law in March after it was passed by the Republican-led legislature. A similar law in North Dakota remains in effect.

U.S. District Court Judge Tanya Walton Pratt granted a preliminary injunction blocking the law from going into effect Friday. The injunction was sought by Planned Parenthood of Indiana and Kentucky.

Pratt, who was nominated by President Obama in 2010, wrote that the ban violates the U.S. Supreme Court's Roe v. Wade ruling, which allows abortions before the point of fetal viability. If a woman choses to get an abortion before that point, a state can't prohibit her based on her reasons for doing so, she wrote.

"This is unsurprising given that it is a woman's right to choose an abortion that is protected, which, of course, leaves no room for the state to examine the basis or bases upon which a woman makes her choice," Pratt wrote.

Susan B. Anthony List President Marjorie Dannenfelser expressed "deep disappointment" with the ruling, saying it allows "lethal discrimination."

"Today's ruling detracts from what has been accomplished in so many other areas of the law to prevent discrimination and other infringements on an individual's rights because of biased perceptions about their worth and their abilities," Dannenfelser said.