The Bangladeshi man who was arrested Wednesday on charges that he plotted to blow up the Federal Reserve Bank of New York had an accomplice in San Diego, who was arrested later on unrelated child-pornography charges, a law enforcement official said on Thursday.

The man described as the accomplice, Howard Willie Carter II, was arrested after an agent with the Federal Bureau of Investigation found 1,000 images and three video files containing child pornography on a laptop and hard drive in the trash near Mr. Carter’s apartment, according to a government document. Officials used material stored on the computer to trace it back to Mr. Carter.

The computer also contained e-mails addressed to “Yaqeen,” a name that Brooklyn prosecutors said Mr. Carter had used in the plot to bomb the Federal Reserve building.

On Wednesday, federal prosecutors in Brooklyn charged the Bangladeshi man, Quazi Mohammad Rezwanul Ahsan Nafis, 21, with conspiring to use weapons of mass destruction and with providing material support to Al Qaeda. They said he had tried to detonate what he believed was a 1,000-pound bomb hidden in a van parked near the Federal Reserve building, on Liberty Street, in the financial district.