Verizon Communications Inc. has reached an agreement in principle with union negotiators representing some 40,000 striking workers, potentially ending one of the longest work stoppages in recent history.

The accord, announced by Department of Labor Secretary Tom Perez Friday, would cover workers in Verizon’s wireline business for four years. The tentative agreement will be sent for approval to the two unions representing workers at the company: the Communications Workers of America and the International Brotherhood of Electrical Workers.

“Throughout the past 13 days of negotiations at the Department of Labor, I have observed firsthand the parties’ good faith commitment to narrowing differences and forging an agreement that helps workers and the company,” Perez said in a statement. “The parties have a shared interest in the success of Verizon and its dedicated workforce.”

He added: “Indeed, these two interests are inextricably intertwined.”

The dispute arose after 10 months of unsuccessful negotiations, with unions and management clashing over provisions related to benefits and offshoring of jobs. Verizon wanted to require workers to relocate to new call centers, a policy bitterly opposed by the unions. 

As the strike that began in April dragged on, customers reported lapses in service and repairs, while union members stepped up their tactics. Verizon brought in thousands of temporary workers to fill the gaps, inviting protest from picketing union members.

The high-profile labor action attracted the attention of both Hillary Clinton and her presidential primary campaign rival Bernie Sanders, who addressed workers during the first week of the strike.

Workers are expected to be back on the job next week, Perez said.