Sprint and T-Mobile have settled on the terms of a $32 billion deal that would further reshape the telecommunications industry, according to a person briefed on the matter.

Both sides have agreed on terms that would see Sprint, which is majority-owned by Japan’s Softbank, acquire Bellevue-based T-Mobile US, creating a stronger rival to the nation’s two largest wireless phone providers, Verizon and AT&T.

Sprint would pay about $40 a share in cash and stock for T-Mobile, about a 17 percent premium to Wednesday’s price, according to the preliminary agreement.

After the deal, Deutsche Telekom, the majority owner of T-Mobile, would own about 20 percent of the merged entity. Deutsche Telekom now owns about 67 percent of T-Mobile

Unlimited Digital Access. $1 for 4 weeks.

The deal is sure to face regulatory scrutiny, and the early terms would include a breakup fee of more than $1 billion that Sprint would pay T-Mobile if the deal is not completed.

An announcement is still a ways off. The two sides have not conducted due diligence on one another, drafted a definitive agreement or arranged financing. A deal could be announced in July but could come as late as August.

Bill White, a spokesman for Sprint, and Anne Marshall, a spokeswoman for T-Mobile, didn’t immediately respond to messages seeking comment.