Sprint and T-Mobile are hoping to get it right this time.

The two wireless carriers are nearing a deal to merge, according to two people briefed on the matter, and an announcement could come as soon as this weekend.

The companies were at the bargaining table twice before, most recently last year. If a deal goes through now, it will create a wireless giant with more than 127 million customers — large enough to challenge Verizon and AT&T, which have long dominated the market. As a result, three companies would control almost the entirety of the American wireless industry.

A deal would allow both carriers to stay competitive as the costs of retaining subscribers rose and bigger rivals built out next-generation wireless networks.

Service providers are preparing to spend billions to expand their so-called 5G infrastructure, money that Sprint and T-Mobile are harder pressed than the competition to spend. Sprint has about $32 billion in debt on its books, while T-Mobile generates a small fraction of the cash that Verizon and AT&T do.