(Reuters) - After months of evaluating sale and merger options, telecommunications gear provider Avaya Holdings Corp on Thursday announced a strategic partnership and $500 million contribution from RingCentral Inc.

Avaya long made hardware systems that sit inside of businesses to provide unified phone and video conferencing services, as well as gear for call centers. The company, which emerged from a bankruptcy filing in 2017 after a previous $8.3 billion leveraged buyout by TPG Capital and Silver Lake in 2007, faces growing competition from large rivals such as Microsoft Corp and Amazon Web Services.

Those rivals deliver similar communications services as software running inside cloud data centers, a capability Avaya has struggled to match but where RingCentral is a major player.

Under the deal, Avaya will rely on RingCentral to provide cloud technology in a new offering. Both companies will contribute funding to the sales and marketing of the cloud product. RingCentral will pay Avaya a $375 million advance for future sales commissions and licensing rights, as well as $125 million in a preferred equity investment that could result a 6% stake in Avaya if converted to common stock.

Executives from both companies declined to say exactly how the ongoing subscription revenue from the new partnership’s product would be split up.

Avaya has been considering selling itself since at least March, when Reuters reported that its board was evaluating a private equity buyout offer that valued the firm at more than $5 billion versus its $1.1 billion market value at the close of business Thursday. In August, Reuters reported that Avaya was considering an all-cash offer from private equity firm Clayton Dubilier & Rice LLC (CD&R) as an alternative to a potential merger with privately held peer Mitel Networks Corp.

In an interview, Avaya CEO James Chirico declined to comment on those other offers. But he said the RingCentral deal, with the infusion of RingCentral’s $375 million advance payment and $125 million preferred equity investment, was the best among the options the company evaluated during its strategic review undertaken with JP Morgan Chase & Co as adviser.

In conjunction with the deal, Avaya said its board authorized $500 million in share repurchases and that it will pay down $250 million of its nearly $3.2 billion debt pile.

“This is not a good deal - this is the best deal,” Chirico said.

RingCentral CEO Vlad Shmunis said the deal was a good use of his company’s cash because it gives it access to Avaya’s 100 million users. RingCentral has about 2 million users, which Shmunis said is an indication of how many businesses have not yet moved their phone networks to the cloud.

“We are optimistic that (Avaya) will blow through this (sales commission) advance and become a driving force” in transition business phone systems to the cloud, he said.

Investment bank Goldman Sachs Group Inc and law firm Wilson Sonsini Goodrich & Rosati served as adviser and legal counsel, respectively, to RingCentral.