BERLIN — Struggling cellphone companies T-Mobile USA and MetroPCS Communications are set to merge, in a deal that will create an operator with more than 40 million subscribers.

In a statement, the two companies said Wednesday that Deutsche Telekom AG, the owner of T-Mobile USA, will hold 74 percent of the new business, while MetroPCS’ shareholders will hold the remainder, as well as receiving a payment of about $1.5 billion.

Both companies have struggled in the highly-competitive U.S. cellphone market.

And even after the combination with MetroPCS, which has 9.3 million subscribers, T-Mobile USA, the country’s fourth-largest cellphone company with 33.2 million subscribers, will still trail the market’s No. 3, Sprint Nextel.

The deal would give T-Mobile USA access to more space on the airwaves, a critical factor as cellphone carriers try to expand their capacity for wireless broadband.

Last year, AT&T struck a deal to buy T-Mobile USA for $39 billion for much the same reason. That was shot down by regulators, who believed competition would suffer if the second-largest cellphone company were to gobble up the fourth-largest.

According to its website, T-Mobile lists about 30 retail locations in the Charleston area. That number is a combination of company-run stores, authorized independent dealers and sales sites within other high-traffic businesses.

On Daniel Island, an estimated 800 T-Mobile call-center employees occupy office space on Fairchild Street, a remnant of the company’s 2007 buyout of SunCom Wireless Holdings.

MetroPCS has no retail stores in the Charleston region, where it sells a plan called “Extended Home Area,” according to a coverage map on the company’s website. That service includes voice and text. Data, e-mail and multimedia access are available in some places.