Kentucky Gov. Matt Bevin (R) speaks at the National Rifle Association’s convention in Louisville in 2016. (Scott Olson/Getty Images)

A federal judge in Kentucky late Wednesday struck down a state law requiring pregnant women to undergo an ultrasound before having an abortion.

Judge David Hale said in a one-page opinion that the law violated the First Amendment rights of physicians.

The law, which was enacted in January, required doctors to perform an ultrasound and attempt to show an image of the fetus and play audio of its heartbeat to a pregnant woman before performing an abortion. It allowed for the woman to avoid looking at the images and to request the volume of the heartbeat to be turned off.

The American Civil Liberties Union filed a federal lawsuit against the law on behalf of the Louisville-based EMW Women’s Surgical Center, the only licensed outpatient abortion provider in Kentucky.

The ACLU called the ruling a “vindication of the rights of Kentuckians and their physicians” in a statement Wednesday.

“We are pleased that Kentuckians will no longer be subjected to this demeaning and degrading invasion into their personal health care decisions,” Alexa Kolbi-Molinas, senior staff attorney with the American Civil Liberties Union’s Reproductive Freedom Project, said in the statement. “This ruling puts us one step closer to getting Kentucky politicians out of the exam room.”

The bill had been signed by Gov. Matt Bevin (R) earlier this year alongside another antiabortion measure which prohibits abortions at or after 20 weeks of pregnancy, unless required to prevent serious risk of bodily harm or death to the mother.

“This is truly a new day in Kentucky,” Bevin said in a statement after signing the two bills. “It is an honor for me to sign into law these historic pieces of legislation that protect our most vulnerable, guarantee important freedoms for workers and set our Commonwealth on a course for unparalleled opportunity and prosperity.”

The ruling comes just months after Bevin attempted to shut down the EMW Women’s Surgical Center, claiming it didn’t meet state health requirements. The ACLU filed a lawsuit in federal court on behalf of the clinic in March, according to U.S. News and World Report.

“If EMW is forced to close its doors, there will be no licensed abortion facility in the Commonwealth of Kentucky,” the suit stated, according to NBC News. “Kentucky women would be left without access to a critical and constitutionally protected medical procedure.”

In the meantime, the clinic and Bevin’s administration reached an agreement allowing it to remain open while litigation was underway, the Courier-Journal reported.

Although that trial ended this month, no verdict has been reached on whether the clinic can remain open, CNN reported.

Read the judge’s ruling

More from Morning Mix

For Hugh Hefner, gay rights were part of the sexual revolution

A police officer posted a ‘don’t drink and drive’ video. Then he was involved in a deadly crash.

Missouri prosecutors: Brutal murder of transgender teen is not a hate crime

Megyn Kelly is striking out with her celebrity guests