CONCORD, N.H. – The New Hampshire Supreme Court on Friday rejected a group of nursing homes’ claim to nearly $9 million in surplus funds, saying the governor had the authority to use the money to balance the budget.

In 2007, lawmakers had directed the state to pay any surplus from its share of Medicare nursing home reimbursements to the nursing homes. But citing a different law, Gov. John Lynch issued an executive order in 2008 reducing the amount intended for the Health and Human Services budget by $8.8 million, the amount that would have gone to the nursing homes.

The New Hampshire Health Care Association, which represents 63 nursing homes, sued the governor to recoup the funds, but a Superior Court judge ruled in the state’s favor. On appeal, the state Supreme Court upheld the lower court ruling.

“The Supreme Court affirmed the authority of the governor and fiscal committee to reduce department spending in order to ensure a balanced budget, and we think the court reached the correct conclusion,” said the governor’s spokesman, Colin Manning.