The alleged mastermind of October's terrorist attack in Bali has told a court the bombing was justified because it was an attack on injustice to Muslims.

Imam Samudra said that if he is sentenced to death for his part in the Bali bombing, it would only bring him "closer to God." He said the attack, which was designed to kill Americans, was justified because of what he describes as America's unfair treatment of Muslims around the world.

Prosecutors allege that 33-year-old Mr. Samudra is the mastermind behind the October 12 bombing of two popular Bali nightclubs. Police said he helped pick the targets and assigned jobs to be carried out by others.

Mr. Samudra made his comments Monday on the first day of the defense presentation in his trial. He has admitted to playing a part in the attack, but denies being its leader.

He justified the bombing by saying that the United States is, in his words, "arrogant, savage and brutal" toward Muslims in Afghanistan, Iraq and Palestine. He also said he was disgusted by the drunken foreigners he saw in Bali.

One of Mr. Samudra's lawyers, Wirawan Adnan said his client is resigned to a guilty verdict in the case, and is using the trial to state his beliefs. "When he saw the sentence made against Amrozi for a very minimum participation, yet he get the maximum sentence, he said that he has nothing to lose. He might as well say what he wants to say," Mr. Adnan said.

Amrozi bin Nuhaysim, another of the Bali suspects, was convicted and sentenced to death on Thursday for buying explosives and a van used in the attack.

Amrozi initially said he looked forward to a "martyr's" death, and celebrated when his sentence was read in court, but on Friday he authorized his lawyers to appeal the verdict. Mr. Samudra similarly faces the death penalty if convicted.

Two hundred two people were killed in the blasts, including 88 Australians. Some of the suspects have said the bombs were aimed at Americans. In the end, seven Americans were among the dead.

Police said Mr. Samudra is a member of Jemaah Islamiyah, a Southeast Asian terrorist organization linked to the al-Qaida terror network. They said he spent three years in Afghanistan, receiving military training and learning how to build bombs.

More than 30 Bali suspects have been arrested, and Mr. Samudra is one of three key suspects currently on trial.