AT&T (T) said it will lease about 9,100 cell towers and sell another 600 to Crown Castle International (CCI) for $4.85 billion, ending the company’s search for a buyer interested in its wireless infrastructure.

The telecom giant indicated last month it was exploring a sale involving its cell towers. According to The Wall Street Journal, American Tower (AMT) also showed interest.

Crown Castle can lease and operate the towers, and the average lease term is about 28 years. Once the leases expire, the Houston-based company has an option to purchase the leased towers for $4.2 billion.

AT&T said it will sublease space on the towers for at least 10 years. It holds an option to renew up to a total of 50 years.

The transaction is expected to close by the end of this year.

“This deal will let us monetize our towers while giving us the ability to add capacity as we need it,” said Bill Hogg, senior vice president of network planning and engineering at AT&T Services. “And we’ll get additional financial flexibility to continue to invest in our business, maintain a strong balance sheet and return value to our shareholders.”

Shares of AT&T were up 1.5% at $35.12 in pre-market trading Monday. Crown Castle slid 1.5% to $74.80.

Follow Matthew Rocco on Twitter @MatthewRocco