The man accused of masterminding the largest identity theft in U.S. history agreed to plead guilty to related charges, according to court papers filed in Boston federal court on Friday.

Albert Gonzalez is accused of helping to steal millions of credit card and debit card numbers from major U.S. retail chains. A former government informant who is already in jail, Gonzalez, 28, agreed to plead guilty to 19 counts in Massachusetts by September 11. The agreement also resolves charges pending in federal court in New York.

He also faces charges in a New Jersey federal court for a similar crime that is the largest in U.S. history. That case is not affected by the Boston plea, a spokesman at the U.S. District Court in New Jersey said.

Gonzalez's operation stole credit and debit card numbers from customers of TJX Cos, BJ's Wholesale Club Inc, OfficeMax Inc, Boston Market, Barnes & Noble Inc, Sports Authority, Forever 21 and DSW Inc.

His lawyer, Rene Palomino, did not immediately return calls seeking comment.