T-Mobile and Sprint have agreed to a $26 billion merger after years of negotiations, CNN reported Sunday.

The merger puts the two telecommunications companies into a tighter battle against industry leaders Verizon and AT&T.

"I'm excited to announce that @TMobile & @Sprint have reached an agreement to come together to form a new company -- a larger, stronger competitor that will be a force for positive change for all US consumers and businesses! Watch this & click through for details,” T-Mobile CEO John Legere tweeted Sunday.

The two companies originally discussed a merger in 2014, but decided against it because of the threat of regulatory challenges by the Obama administration, CNN reported. A second merger attempt also broke down in November 2017.

T-Mobile majority owner Deutsche Telekom will hold a 42 percent stake in the new company, Variety reported. Sprint majority owner SoftBank will hold 27 percent. The rest will be held by public shareholders.

If the merger is approved, it should close by early 2019, Variety reported.