A federal appeals court is upholding a block on a Mississippi law that would ban abortion at the detect of a fetal heartbeat, around six weeks into a pregnancy.

A three-judge panel in the 5th U.S. Circuit Court of Appeals on Thursday found the law to be unconstitutional because it would ban abortion before viability, when a fetus could survive outside the womb. Roe v. Wade, the landmark 1973 Supreme Court ruling, legalized abortion nationwide prior to viability, occurring at or around 24 weeks into a pregnancy.

The appeals court wrote in its decision Thursday that the Mississippi clinic said a fetal heartbeat can be detected at six weeks, while attorneys for the state argued that it could occur anywhere from six to 12 weeks.

“But all agree that cardiac activity can be detected well before the fetus is viable,” the appeals court wrote. “That dooms the law. If a ban on abortion after 15 weeks is unconstitutional, then it follows that a ban on abortion at an earlier stage of pregnancy is also unconstitutional.”

The Mississippi ban passed in 2019 is now the first to be blocked at the appeals court level.

SEX EDUCATION ORG DEPICTS FETUS AS CIRCULAR BLOB IN VIDEO DESCRIBING ABORTION PROCEDURES

After former Republican Gov. Phil Bryant signed the law, the only abortion clinic in Mississippi sued the state. The appeals court judges agreed with a district court judge who blocked the law from taking effect in 2019.

In December, the conservative 5th circuit blocked a Mississippi abortion law banning the practice at 15 weeks, before viability. The state asked the full appeals court to reconsider the decision and the court said it could not do that.

U.S. District Judge Carlton Reeves first blocked the ban in May. "Here we go again," Reeves wrote. "Mississippi has passed another law banning abortions prior to viability."

Reeves was the same judge to strike down the 2018 Mississippi law banning abortion at 15 weeks.

ACTRESS PATRICIA HEATON SLAMS DEMS' 'BARBARIC PLATFORM' ON ABORTION

"It sure smacks of defiance to this court," he said of lawmakers passing another ban after he struck down the earlier one.

Eighteen states have either introduced or passed a heartbeat bill. Such bills have passed in Ohio, Georgia, Mississippi, Missouri and Iowa, but none have gone into effect because they’ve either been vetoed or struck down in court.

CLICK HERE TO GET THE FOX NEWS APP

Emboldened by the addition of conservative justices to the U.S. Supreme Court under the Trump administration, several states have enacted laws seeking to spur court challenges that could make their way up to SCOTUS and have Roe v. Wade overturned.

The Associated Press contributed to this report.