Nearly two months after state employee unions dealt Gov. Dannel Malloy a blow by rejecting a $1.6 billion concession agreement, the deal was decisively ratified in a re-vote concluded Wednesday night.

In order to fill a $2 billion gap in the state budget for the next two years, Malloy asked the state’s 45,000 employees to accept cost-saving changes to their health benefits, pensions and wages. On May 13, Malloy announced that he secured $1.6 billion of that gap in a tentative agreement with union leaders, but when it was put to a vote by union members just five weeks later, it fell short of the 80 percent minimum required by union rules for ratification.

The collapse of the deal triggered fears of cuts in state aid to municipalities, led Malloy to call the General Assembly to a special session just days before the start of the fiscal year, and resulted in thousands of layoff notices, all of which will now be rescinded. After several weeks of closed negotiations among representatives of the state’s 15 unions and leaders of the State Employees Bargaining Agent Coalition (SEBAC), who negotiated the agreement with the Malloy administration, the threshold for ratification was lowered to a simple majority.

Under the threat of up to 7,500 layoffs, 26,000 union members voted to ratify the agreement by a more than 2 to 1 margin, according to a statement by SEBAC spokesman Larry Dorman.

“In one of our state’s darkest times, state employees have stepped forward once again to be part of the solution,” SEBAC leader Daniel Livingston wrote in a letter the coalition sent to Malloy today.

The deal’s approval was political redemption for Malloy, who faced criticism in June over his failure to secure concessions from public employees.

Just three days after the deal fell through despite 57 percent support from union members, New Jersey Gov. Chris Christie, a Republican who obtained similar concessions in his state, mocked Malloy on the MSNBC show “Morning Joe” for “lecturing me about ‘look how he can get it done, he’s conciliatory, he negotiates with people,’ and they stuck it to him.” While Malloy did not mention any of his critics by name Thursday, he made clear his belief that the deal’s ratification was a vindication for his approach to public employees.

“We have achieved something the skeptics said was unachievable: we’ve made the relationship between the state and its workforce sustainable,” Malloy said in a statement, adding that “unlike in most other states, we did it without going to war with public employees” — a shot at Christie and Wisconsin Gov. Scott Walker.

The agreement is expected to save the state $21.5 billion in health and pension costs over the next 20 years, Malloy said in the statement.