FRANKFORT, Ky. (WDRB) -- Kentucky's Republican governor says the judge who struck down a pension law he signed is "terrible" at his job and makes decisions based on politics.

Gov. Matt Bevin called Franklin Circuit Judge Phillip Shepherd a "liberal Democrat" during a CNBC interview on Thursday. Shepherd ruled on Wednesday that a recently enacted pension law was unconstitutional because of how lawmakers passed it. Republican leaders replaced a bill that had been about sewer systems with the pension bill on one of the final days of the legislative session.

Bevin has criticized Shepherd in the past, calling him an "incompetent hack." Shepherd has not responded to Bevin's comments. He said the law was needed to "stop the bleeding" in Kentucky's pension system, which is one of the worst-funded systems in the country.

Bevin was on CNBC's "Power Lunch" in April to talk about trade, tariffs and the opioid lawsuit filed against Johnson & Johnson by Kentucky Attorney General Andy Beshear. Bevin said he does not support the lawsuit that accuses the drug company of deceptive marketing and neglecting to track the number of painkillers prescribed in the state.

"I'm not on board with just about anything that he does," Bevin said about Beshear. The governor pointed out that the AG has sued him "repeatedly." And he said Beshear is not a competent attorney.

Beshear won a court battle this week, when Judge Shepherd shot down the pension law signed by Bevin calling it "unconstitutional."

Bevin called the five lawsuits Beshear has filed against pharmaceutical companies and a pharmacy chain "political moves" that are not "well laid out."

Copyright 2018 WDRB Media and The Associated Press. All rights reserved.