Less than two months ago, the situation was dire between Frontier Communications and the Connecticut union representing 2,200 AT&T workers who would join Frontier after a proposed merger.

On May 2, negotiators for the Communications Workers of America, Local 1298, ended meetings with Frontier amid angry accusations as the union believed the company would cut more than 1,000 jobs even though Frontier said it would maintain the workforce. CWA vowed to block Frontier's attempt to buy AT&T's wireline business in the state for $2 billion.

But Wednesday, the two sides reached a peaceful deal — one day before state regulators begin hearings on the AT&T-Frontier sale.

Under the deal, Frontier, based in Stamford, would:

— Add 85 new union jobs.

— Guarantee job security and workforce size.

— Give priority routing to Connecticut call centers.

— Open a new service center for dispatch and U-verse tech support.

— Give all union members 100 shares of Frontier stock, which were worth $5.70 each after Wednesday's close on the Nasdaq market.

— Extend the existing contract by two years to 2018.

The union members include customer service reps, line workers, engineers, splicers, installers, reviewers and support staff. CWA has shown a willingness to fight long and hard, most recently holding out for 13 months under an expired contract before signing a new agreement with AT&T — making it the last of the company's U.S. bargaining units to do so after a 2012 contract expiration.

"After several months of complex negotiations, we are very pleased with the agreement reached today with Frontier," said Bill Henderson, president of CWA Local 1298, in a joint statement issued by the union and the company. "We believe it is in the best interests of Connecticut's telecommunications workers and consumers."

"We are very pleased the CWA acknowledges the transaction's benefit to the public," said Daniel J. McCarthy, president and chief operating officer of Frontier, in the joint statement. "Our discussions with the CWA about the Connecticut acquisition have been open, honest and ongoing. We look forward to a strong partnership."

McCarthy had said on Dec. 17, when the acquisition was announced, that the company could save $200 million a year in operating costs, though he also said the union would keep the same number of members. Frontier appears to have met some of the union's demands, and in part, the union's anger appears to have been based on a misunderstanding of what Frontier would do — after years in which AT&T has cut or downgraded thousands of jobs in the state.

The deal is expected to close in the last quarter of this year, pending approval by the Federal Communications Commission and by the Connecticut Public Utilities Regulatory Authority, which opens its hearings Thursday at its offices in New Britain.