LEXINGTON, Ky. — Attorney General Andy Beshear’s victory at the state Supreme Court last week might have been good news for Kentucky’s colleges and universities, but it could eventually hurt the state’s credit rating, according to one major ratings agency.

The state Supreme Court said last week that Gov. Matt Bevin is not allowed to order spending cuts at public colleges and universities unless the state legislature agrees. Moody’s weekly credit outlook for public finance, released late Thursday, says the court’s decision is a “credit negative” for the state because it limits the governor’s ability to “manage difficult budget scenarios without the cooperation of the state legislature.”

Bevin had ordered 2 percent cuts at most colleges and universities during the last quarter of the 2016 fiscal year, which ended June 30. He did so out of concerns for the state’s public pension debt, estimated at more than $30 billion.

But the state legislature did not approve those cuts, and Beshear sued to stop them. Last week, the state Supreme Court ruled 5-2 that state law allows Bevin to order spending reductions only if there is a budget deficit of 5 percent or less. Kentucky finished the 2016 fiscal year with a $52.7 million surplus.

Moody’s analyst Dan Seymour noted the nearly $18 million in spending cuts Bevin ordered is “trivial,” given that Kentucky’s annual revenues exceed $10 billion.

“What is not trivial is a potential limit on gubernatorial powers to reduce spending without legislative collaboration, which our US states methodology expressly considers a governance weakness,” Seymour wrote. “Without such a power, states are less capable of quickly adjusting to revenue shortfalls or unexpected spending increases.”

Bevin said the outlook means Kentucky should “work together to get Kentucky’s financial house in order.”

“Every Kentuckian should be outraged that our Attorney General and court system are undermining the Commonwealth’s best interests for cheap political victories,” Bevin said.

Beshear said Moody’s should know that Kentucky law does allow the governor to order spending cuts, but only in the event of a deficit.

“Kentucky law protects our liberty by strongly enforcing our separation of powers and ensuring that no person, not even the governor, has too much power,” Beshear said. “The problem here is that (Bevin) refused to follow the law.”

Seymour noted that Kentucky’s law allowing the governor to order spending cuts in the event of a 5 percent deficit is “a very helpful feature.” But he said the ability to reduce spending without restrictions comes in handy.

“The governor of Kansas … reduces spending each year to adjust to the state’s chronic revenue shortfalls, and the state’s credit quality would likely be worse without these actions,” Seymour wrote.

Bevin could ask the court to reconsider its ruling. He has not said yet how he will respond.