A sophisticated computer hacker who allegedly participated in a conspiracy that netted more than 40 million credit and debit card accounts from at least nine corporations has agreed to plead guilty to wire fraud and conspiracy charges in federal court in Boston, capping one of the largest-ever identity theft prosecutions, Justice Department officials said Friday.

Albert Gonzalez, 28, a Miami native and one-time Secret Service informant, is scheduled to plead guilty in U.S. District Court for the District of Massachusetts next month, according to a plea agreement filed Friday.