Verizon Communications on Friday reached an agreement in principle with some 40,000 striking workers on a new four-year contract.
Though full details of the agreement were not immediately available, unions representing the workers said the new contract would improve standards of living and cover some employees at Verizon’s wireless retail stores for the first time. Verizon said that included just 165 employees at a handful of stores in New York and Massachusetts who voted to unionize two years ago but hadn’t been covered by prior contracts.
News of the tentative deal to settle the largest strike in the United States in five years came from Labor Secretary Thomas Perez, who intervened two weeks ago to restart negotiations between Verizon and the two unions, the Communications Workers of America and the International Brotherhood of Electrical Workers.
“The parties are now working to reduce the agreement to writing, after which the proposal will be submitted to CWA and IBEW union members for ratification,” Perez said in a statement. “I commend the leadership of Verizon, CWA, and IBEW for their commitment to resolving these difficult issues in the spirit of constructive engagement. I expect that workers will be back on the job next week.”
The unions said they achieved their major goals, including extending their reach to some workers in Verizon’s wireless stores.
“The addition of new, middle-class jobs at Verizon is a huge win not just for striking workers, but for our communities and our country as a whole,” CWA president Chris Shelton said in a statement. “The agreement in principle at Verizon is a victory for working families across the country and an affirmation of the power of working people.”
Verizon officials also cheered the agreement. “The agreement is consistent with our objective of creating high quality American jobs and achieving meaningful changes and enhancements to the contracts that will better enable our wireline business unit to compete and succeed in the digital world,” Marc Reed, Verizon’s chief administrative officer, said in a statement.
Get Data Sheet, Fortune’s technology newsletter.
Both sides will try to argue internally that they came out ahead from the deal, but the unions may have the harder case to make to their members, Jeffrey Keefe, a professor emeritus at the Rutgers School of Management and Labor Relations, says. “The unions have the heftier task internally,” Keefe says. “The workers have put a lot of faith in them by giving up their paychecks to get a much better offer than they started with.”
The settlement came days after company executives conceded publicly that the walkout of workers who mostly install and service Verizon’s traditional telephone and FiOS Internet and cable TV service was hurting business. CFO Fran Shammo said replacement workers were concentrating on helping existing customers, leading to a significant drop in setting up new customers.
Shares of Verizon, which lost 3% over the course of the strike, gained 1% on Friday.
Striking workers, who walked off the job on April 13, had said they say they could not accept Verizon (vz) proposals that would allow additional outsourcing of call center workers to the Philippines and Mexico, greater use of nonunion contract installers, and the assignment of employees to other cities for up to two months at a time.
Verizon (vz) was offering a 7.5% wage hike for a new contract over the next few years, but also said it needed new work rules to gain greater flexibility and lower costs as its telephone business shrunk and its wireless business became ever more important.
While Verizon’s heavily unionized wireline unit has been shrinking, both in revenue and in the number of workers employed, the company’s almost-union-free wireless business has grown much faster. Wireless now brings in the vast majority of the company’s sales and profits.
For more on the impact of the strike, watch:
Last year, for example, the wireless unit brought in revenue of $91.7 billion, up 5% from a year earlier, and an operating profit of nearly $30 billion. The older wireline unit, which also includes wired video and Internet service, brought in revenue of only $37.7 billion, a 2% decline from the year before, and an operating profit of just $2.2 billion.
The strike lasted much longer than a similar walkout by Verizon workers in 2011. But although workers ended the earlier strike after two weeks, they didn’t agree on a new contract for another year.