The deal sent Deutsche Telekom’s shares to their biggest daily gain yet, and gives AT&T about 43% of the US mobile market.
The deal still needs approval from regulators.
It also gives the German telecoms giant the cash to buy backs shares and pay dividends.
Shares in Deutsche Telekom initially gained 16.3%, before slipping back to 10.79 euros a share – a 12.6% rise.
Deutsche Telekom said it would pay 3.4bn euros ($4.8bn; £3bn) in dividends between 2010 and 2012, pay down debt and spend 5bn euros on share buybacks in the three years after the deal.
AT&T will pay $25bn in cash and the rest in stock, while Deutsche Telekom will retain an 8% stake in the US carrier.
The deal means that AT&T is effectively about spending more than $1,000 per T-Mobile customer to overtake the industry leader Verizon Wireless.