A Los Angeles computer security consultant agreed Friday to plead guilty to using computer spyware that he planted in other people’s computers to steal identities, U.S. federal prosecutors said.

John Schiefer, 26, was accused of using “botnets” — armies of infected computers — to steal the identities of victims across the country by extracting information from their personal computers and wiretapping their communications, according to the U.S. Attorney’s Office here.

Investigators say Schiefer and two minors — identified in the complaint only by their online screen names “pr1me” and “dynamic” — broke into about 250,000 PCs. On at least 137,000 of those infected systems, Schiefer and his cohorts installed programs that allowed them to control the machines remotely. The malicious “bot” programs also allowed the attackers to steal any user names and passwords that victims had saved in Internet Explorer.

The vast number of computers that Schiefer compromised — as many as 250,000 — highlights a stealthy online crime spree on the rise. These botnets, short for “robot networks,” remotely harvest personal information, including user names and passwords, to give their operators access to credit card information and online bank accounts.

Federal law enforcement agencies have stepped up their pursuit of botnet operators in recent years as they have drained bank accounts, stolen identities and overwhelmed federal authorities, security experts say.