The Department of Justice filed a lawsuit on Tuesday challenging Idaho's near-total ban on abortion, arguing that it would criminalize doctors for performing abortions during medical emergencies. 

Idaho's law is set to take effect Aug. 25 after the Supreme Court in June overturned Roe v. Wade, returning the issue of abortion to the states. 

The law bans all abortions except for cases of incest or rape that are reported to law enforcement, or when a physician determines "in his good faith medical judgment and based on the facts known to the physician at the time, that the abortion was necessary to prevent the death of the pregnant woman."

Supreme Court Roe v Wade

People protest about abortion outside the Supreme Court in Washington.  (AP Photo/Steve Helber)

Attorney General Merrick Garland on Tuesday argued that Idaho's law would violate the Emergency Medical Treatment and Labor Act, which requires doctors to provide stabilizing treatment. 

FEDERAL JUDGE TEMPORARILY BLOCKS ARIZONA LAW RECOGNIZING ‘PERSONHOOD’ AT FERTILIZATION

"When a hospital determines that an abortion is the medical treatment necessary to stabilize a patient's emergency medical condition, it is required by federal law to provide that treatment," Garland said at a news conference. 

"Although the Idaho law provides an exception to prevent the death of a pregnant woman, it includes no exception for cases in which the abortion is necessary to prevent serious jeopardy to the woman's health."

Idaho State Capitol

Idaho State Capitol Building in Boise, Idaho. (powerofforever via Getty Images)

Department of Health and Human Services Secretary Xavier Becerra said that patients have the right to "stabilizing hospital emergency room care" regardless of state law. 

"Women should not have to be near death to get care," Becerra said in a statement. "The Department of Health and Human Services will continue its work with the Department of Justice to enforce federal law protecting access to health care, including abortions."

CLICK HERE TO GET THE FOX NEWS APP

Becerra issued guidance to health care providers last month that states physicians "must" provide an abortion if it is the "stabilizing treatment necessary to resolve" an emergency medical condition. 

Texas Attorney General Ken Paxton filed a lawsuit challenging that guidance, arguing the Biden administration is "flagrantly disregarding the legislative and democratic process" by mandating "that hospitals and emergency medicine physicians must perform abortions." 

Tuesday's lawsuit challenging Idaho's ban marks the first major legal challenge by Biden's Justice Department.