ALBANY — Gov. Paterson suffered back-to-back defeats in his war with unions yesterday as a federal judge blocked his controversial furlough plan — and the governor was forced to rescind raises for five aides.

Albany federal Judge Lawrence Kahn ordered the Democratic governor to back off his unprecedented furlough plan until a May 26 hearing to determine whether it’s constitutional.

The decision — although temporary — came hours after Paterson abruptly revoked pay raises for five staffers amid a firestorm of criticism from labor leaders.

Paterson spokesman Morgan Hook announced the reversal just hours after defending the decision to grant “promotions” and salary hikes ranging from 15 percent to 29 percent to a secretary and four press aides.

“We are going to do what is not the right thing and we’re going to pull back these promotions because we will not allow this,” Hook said on Albany radio station WGDJ 1300-AM.

“We are not going to allow these unions to distract from the real issue here.”

Kahn’s decision had ominous overtones for the governor’s efforts to extract $250 million in contract concessions from public employee unions.

The judge also ordered Paterson to include scheduled 4 percent pay raises, which the governor had been withholding, in any further spending bills.

The governor, who wants quick action on closing the estimated $9.2 billion budget gap, had instituted the furloughs to get unions to pressure lawmakers to reach a deal. With that pressure lifted, the Legislature can continue to drag out the talks.

Unions — led by the Civil Service Employees Association and the Public Employees Federation — asked the court to block agencies from forcing 100,000 state workers to take the first unpaid holiday next week.

The Legislature reluctantly approved the furloughs Monday after Paterson fused the plan into an emergency spending bill that would have forced a government shutdown if it weren’t passed.

Kahn’s ruling cited a Senate resolution blasting the furlough plan as “contrary to public policy.”

“This clear statement by the New York state Legislature strongly supports the court’s decision to grant the temporary relief requested by [the unions],” Kahn wrote.

The governor vowed to fight the decision.

“Until we go to court, the state work force will not be making any sacrifice in the deficit-reduction plan,” Paterson told reporters.

“That’s unfortunate, but this is a system of laws and a society of rules. So we’ll go to court and try to persuade them that our position is right.”

The setbacks came as two dozen Democratic Assembly members stormed Paterson’s Capitol office and secured an audience with the governor to discuss the budget standoff.

“This is an attention-getting effort,” said Assemblyman Steve Englebright (D-LI). “The furlough vote and then the lavishing of raises was really something that put a lot of members on edge in a new way.”