A federal appeals court has ruled that Idaho’s law banning abortions past the fifth month of pregnancy is unconstitutional.

The Hill reports the 9th Circuit Court of Appeals claimed Idaho’s law violates the Supreme Court’s ruling in 1992 in Planned Parenthood v. Casey, which affirmed the earlier Roe v. Wade decision, and said unborn babies may be aborted up to the point at which they are viable outside their mother’s wombs.

“Because [Idaho’s law] places an arbitrary time limit on when women can obtain abortions, the statute is unconstitutional,” Judge Harry Pregerson wrote for the majority of the three-judge panel.

“Two [judges] were appointees of Democratic presidents and one of a Republican president,” notes The Hill.

As Breitbart News reported, the U.S. House of Representatives passed a similar measure earlier in May. The Pain-Capable Unborn Child Protection Act passed by a vote of 242-184 on the second anniversary of the murder conviction of abortionist Kermit Gosnell, who was charged with killing infants who survived abortion procedures and with the negligent death of one of his abortion patients.

The House bill passed as a recent study was published in the New England Journal of Medicine that found more very premature babies are surviving outside the womb with fewer health problems due to medical advances.

According to Marjorie Dannenfelser, president of the pro-life Susan B. Anthony List, the Pain-Capable bill “to protect the most innocent among us is an opportunity for clarity heading into the 2016 elections. Protecting pain-capable babies and mothers at risk during a late-term abortion is a winning issue and one that has unified the entire Republican presidential field.”

The United States is one of only seven nations that allow elective abortions after 20 weeks post-fertilization.

As The Hill reports, the 9th Circuit also struck down the 20-week abortion ban in Arizona in 2013.