A sophisticated hacker pleaded guilty Tuesday to conspiring to hack into computer networks supporting major American retail and financial organizations, and to steal data relating to tens of millions of credit and debit cards in a case that the Justice Department said is one of the largest data breaches ever investigated and prosecuted in the United States.

Albert Gonzalez, 28, of Miami, a one-time Secret Service informant, pleaded guilty to two counts of conspiracy to gain unauthorized access to the payment card networks operated by, among others, Heartland Payment Systems, a New Jersey-based card processor; 7-Eleven, a Texas-based nationwide convenience store chain; and Hannaford Brothers Co. Inc., a Maine-based supermarket chain, according to a Justice Department statement. Several co-defendants have already pleaded guilty.