A California man was sentenced to 12 years and seven months in prison Thursday for his role as the brains behind a widespread phishing scam that took in more than 38,000 victims.

That Tien Truong Nguyen, 34, worked with Romanian scammers to drive users to websites that were set up to look up like they belonged to legitimate financial institutions. After victims entered their information on the sites, Nguyen sold the data to two alleged co-conspirators, Stefani Ruland and Ryan Price, who used the information to set up lines of credit -- typically between US$1,000 and $2,000 -- at instant credit kiosks at Wal-Mart stores.

They used those lines, as well as fake credit cards made using the stolen data, to purchase products from Wal-Mart, which they then sold for cash.

Prosecutors say Ruland and Price stole nearly $193,000 in less than two months by hitting Wal-Mart stores throughout California. They have both been sentenced to prison in connection with the fraud, according to Lauren Horwood, a spokeswoman for the U.S. Department of Justice.

When police arrested Nguyen in January 2007, they found stolen information, including bank and credit card numbers, belonging to 38,500 victims.

They also found 20 Web templates used to make fake sites for businesses such as eBay and local banks, including Florida's Fairwinds Credit Union and Washington's Heritage Bank.

In court filings, prosecutors said Nguyen, who went by the name Tim, got involved in phishing because it was easy money. He told investigators that "he wanted to quit identity theft, but resumed it if he was smoking methamphetamine; and that the drug gave him the drive to do identity theft," prosecutors said.

In a sentencing memorandum, Nguyen's lawyers said his drug problems started at age 15 and that, despite previous criminal convictions, he had turned his life around since his arrest. Nguyen immigrated to the U.S. at age 3 but could face deportation as a result of his conviction, his lawyers wrote.

The judge in the case, U.S. District Judge Morrison England, Jr., apparently did not buy that argument. He sentenced Nguyen to 12 years and seven months on fraud and hacking charges, and for being a felon in possession of a Remington 12-gauge shotgun.

Nguyen couldn't be reached for comment Thursday.

Robert McMillan covers computer security and general technology breaking news for The IDG News Service. Follow Robert on Twitter at @bobmcmillan. Robert's e-mail address is robert_mcmillan@idg.com