Commuters hoping to save a few bucks were dealt a major blow yesterday after a state appeals court ruled the MTA had the legal right to raise fares and tolls this year.

The unanimous decision by the five-judge state Appellate Division panel reversed the rulings of two lower-court judges, who two months ago had ordered the Metropolitan Transportation Authority to roll back the increases.

The sharply worded, 28-page ruling was a loss for two commuter groups that had previously convinced two Manhattan Supreme Court judges to roll back bus, subway and railroad fares, and tolls on bridges and tunnels, and to halt the closings of 62 subway-station booths.

The appeals judges found the MTA had not broken state law when it failed to notify the public that it had enough reserve money to delay a hike this year and that it had “exceeded the statutory requirements” on its public-hearing notices.

“If the petitioners believe those requirements should be changed, then they should take their case to the state Legislature,” the court said.

In May, the MTA raised bus and subway fares by 50 cents, to $2; commuter-rail tickets an average of 25 percent; and tolls on its seven bridges and two tunnels by 50 cents.

The moves were intended to close a projected $952 million deficit.

Gene Russianoff, staff lawyer for the Straphangers Campaign, said the group now would ask the state Court of Appeals in Albany to hear the case.

“I’ve had better days,” he said. “I’m not breaking out the champagne or anything.”

The tug-of-war to roll back the hikes started in May, after the Straphangers Campaign and the Automobile Club of New York filed separate lawsuits arguing the MTA had duped the public on the size of its deficit.

Both suits were based on a controversial budget review issued in April by state Comptroller Alan Hevesi and city Comptroller Bill Thompson, who charged the MTA kept two sets of books and hid more than $500 million in surplus cash to justify the increases.