Leap Wireless International, the San Diego flat-rate wireless carrier doing business under Cricket, said it’s agreed to be acquired by AT&T for $15 a share, or nearly $1.2 billion.

Including Leap’s net debt of $2.8 billion, the deal is worth about $4 billion.

Under the agreement, which requires approval of shareholders and various federal regulatory agencies, AT&T would obtain all of Leap’s network infrastructure, its licenses, retail stores and some 5 million subscribers.

Shareholders of 29.8 percent of Leap’s 79 million outstanding shares have agreed to sell the company.

Spun off from Qualcomm Inc. in 1998, Leap Wireless was initially building wireless networks in Latin America, but changed its strategy to target low income and urban residents unwilling to commit to long-term contracts but happy to purchase the service in advance on a month-to-month basis.

The proposed offer is an 88 percent premium above Leap’s most recent market share price. Shares of Leap, traded under LEAP on the Nasdaq Stock Exchange, closed at $7.98 July 12 before the news was released. After hours trading pushed shares above $16.

Leap has been rumored to be in sale talks with a number of suitors in recent years. In 2010, its board rejected a purchase offer from rival MetroPCS that would have provided investors an aggregate $5.5 billion.

In May, MetroPCS was acquired by T-Mobile USA.

Earlier this year Leap said it had a total of 3,800 employees including 420 at its headquarters office in Sorrento Mesa.

— Mike Allen