Maryland Gov. Larry Hogan’s decision to withhold money from local governments to help them pay for teachers’ pensions could have a negative impact on the jurisdictions’ bond ratings, Moody’s credit rating service said Thursday.

An official for the company said the decision does not automatically spell trouble for Baltimore and the 21 counties that were expecting the money to cover pension costs. But Moody’s issued a “negative alert” in a report released Thursday to indicate that Hogan’s move could be problematic.

“We’re not saying the rating would change even if the funds are not restored, just that it would be a negative because these counties would have to come up with the funds themselves,” said David Jacobson, a spokesman for Moody’s.

State budget officials announced last week that the governor planned to save, rather than spend, $80 million that the General Assembly set aside to be used on various programs that lawmakers outlined. The “fenced off” money includes $19 million for the pension contributions, of which Montgomery, Howard and Baltimore counties were set to receive $10.9 million.

Montgomery County Executive Isiah Leggett (D) said Thursday that he had not reviewed Moody’s report but that he could not see how a loss of the funding would harm the county’s bond rating.

“Our bonds are tied to a number of factors,” Leggett said. “While we do take into consideration any level of support we get from the state, [the pension funding] should not threaten our bonds.”

Del. Benjamin S. Barnes (D-Prince George’s), a member of the House Appropriations Committee, said counties should take Moody’s “negative alert” seriously.

“The larger issue is why is he refusing to release the funds?” Barnes said. “Does he not want to keep the commitment to teachers’ pensions?”

Hogan, when asked about the money during a visit to Frederick on Wednesday, called state lawmakers’ action to fence off the money a “terrible decision.”

“They put good things and bad things in there and said you have to either support all of them or none of them, and we chose none of them,” Hogan said. “They took actions that were irresponsible, and now they are trying to point the finger at me.”

The negative alert on the credit outlook report is the latest fallout from last week’s announcement.

Hogan has been sparring with teachers’ union officials over his decision.

After someone posted on the governor’s Facebook page questioning the decision and criticizing him for withholding the money, Hogan responded by saying that he has spent record amounts on education and that the poster should not “believe this phony ‘cut’ propaganda from the union thugs.”

Teachers blasted Hogan on social media, accusing him of calling them “thugs.” But Hogan said the word was directed at state teachers union officials, and on Wednesday when asked about the exchange on Facebook, the governor did not back away from what he wrote.

“I have never made a disparaging reference to any teacher; I have never said anything bad about any union member,” he said. “I was referring to sleazy, paid political operatives who were putting out blatantly false information to mislead and confuse the public, and I find their behavior reprehensible.”