SAN ANTONIO— AT&T Inc. will exit the rapidly shrinking pay phone business by the end of next year, before it becomes unprofitable, the company said Monday.

AT&T will sell 65,000 pay phones, in prisons and in public places, within its original 13-state area before the end of 2008, said spokesman Michael Coe.

AT&T decided to leave pay phones, a tiny portion of the telecommunications company that has 67.3 million wireless subscribers, before they reached the point of being unprofitable, he said.

AT&T officials said they will try to sell as many of the pay phones to independent operators as possible; those that are unsold will be removed.

The pool of pay phones nationwide has shrunk from 2.6 million to 1 million in the last decade. AT&T had roughly 400,000 pay phones in 1998, but it has seen a rapid decline in the business since then.

BellSouth Corp., which AT&T acquired at the end of 2006, already exited the business, as has Qwest Communications International Inc.