An extremist cell in northeastern Spain was preparing bombs for an imam who planned to blow himself up at a Barcelona monument, a suspect in the attacks that killed 15 people in northeastern Spain told a judge Tuesday, according to a judicial official.