What happened

Shares of Telefonica (TEF -0.48%) jumped 10% on Wednesday after the Spanish telecom company agreed to sell its European and South American towers and related assets to American Tower (AMT -0.60%). The deal makes sense for both parties, and as of this writing shares of American Tower are up slightly as well.

So what

On Wednesday Telefonica said its Telxius Telecom unit has agreed to sell towers in Spain, Germany, Brazil, Peru, Chile, and Argentina for 7.7 billion euros, or about $9.41 billion in cash. American Tower is buying 30,722 tower sites, with Telefonica cellular operators maintaining current lease agreements to continue to transmit from the towers.

A cellular tower overlooks a rural, forested landscape.

Image source: Getty Images.

American Tower is also expected to spend about $500 million to construct planned towers at 3,300 new sites in Germany and Brazil through 2025. The buyer said it expects the assets to generate about $775 million annually in property revenue.

For American Tower, the deal is "transformational for our European business," according to CEO Tom Bartlett. Telefonica, meanwhile, will have a chance to pay down some of its 37 billion euro debt balance, and avoid adding to that total to invest in tower expansion.

Now what

Telefonica has been a tough stock to love, down more than 28% over the past year even after Wednesday's jump. The company has reportedly been considering a number of options to pay down its debt, with reports surfacing in December that it could sell operations in Colombia and Ecuador to raise cash.

The company is following a well-traveled path in divesting its towers to a pure-play operator and focusing on the core cellular communications business, but that business still has a lot of competition. This deal is a step in the right direction, but investors should remain cautious about buying in.