A judge blocked Georgia's law outlawing almost all abortions after six weeks on Tuesday, ruling that it violated the U.S. Constitution when it was enacted by the state legislature three years ago. 

The law, passed in 2019, restricts abortions once cardiac activity can be detected by an ultrasound, which is usually around six weeks. It includes exceptions for rape and incest as long as a police report was filed, and allows for later abortions if a pregnant woman's life is at risk. 

It was blocked for three years until the U.S. Supreme Court overturned Roe v. Wade in June, freeing states to pass their own regulations on abortion. 

Supreme Court abortion protesters are seen after Roe v. Wade was overturned

Crowds outside the Supreme Court reacting to the Dobbs ruling. (Joshua Comins/Fox News)

Fulton County Superior Court Judge Robert McBurney ruled Tuesday that when the law was signed by Georgia Gov. Brian Kemp, "everywhere in America, including Georgia, it was unequivocally unconstitutional for governments — federal, state, or local — to ban abortions before viability."

MICHIGAN JOINS CALIFORNIA, VERMONT IN PROTECTING ABORTION IN STATE CONSTITUTION

Georgia Attorney General Chris Carr immediately appealed the ruling to the Georgia Supreme Court on Tuesday. 

"We have filed a notice of appeal and will continue to fulfill our duty to defend the laws of our state in court," Kara Richardson, a spokesperson for Carr, said in a statement. 

abortion rights protest

A small group, including Stephanie Batchelor, left, sits on the steps of the Georgia state Capitol protesting the overturning of Roe v. Wade on June 26, 2022.  (AP Photo/Ben Gray, File)

McBurney ruled Tuesday that the 2019 law "may someday become the law of Georgia," but only after the General Assembly "determines in the sharp glare of public attention that will undoubtedly and properly attend such an important and consequential debate whether the rights of unborn children justify such a restriction on women’s right to bodily autonomy and privacy."

The issue of abortion took center stage during midterm elections in Georgia and the rest of the U.S. 

Multiple women accused Georgia Republican Senate nominee Herschel Walker of pressuring them to have an abortion during relationships, allegations that Walker has denied. 

Georgia Senate candidates Herschel Walker and Raphael Warnock are seen on election night

Republican U.S. Senate candidate Herschel Walker (left) will face off against Democratic Sen. Raphael Warnock (right) in Georgia's runoff election for U.S. Senate on Dec. 6.  (AP Photo/Brynn Anderson | AP Photo/John Bazemore)

CLICK HERE TO GET THE FOX NEWS APP

Walker will face Democratic Sen. Raphael Warnock in a Dec. 6 runoff after both candidates failed to garner 50% of votes during last week's midterm elections. 

The Associated Press contributed to this report.