JAKARTA, Indonesia— An alleged Islamist militant being tried on charges of harboring terrorists behind deadly twin hotel bombings in the Indonesian capital claimed Wednesday that he had helped craft a plot to assassinate the president.

Amir Abdillah appeared in South Jakarta District Court on charges of violating Indonesia's anti-terrorism law, including concealing information and harboring terrorists linked with the July 17, 2009 attacks at the J.W. Marriott and Ritz Carlton hotels in Jakarta. The bombings, which killed seven and wounded more than 50, ended a four-year lull in terrorism in the Muslim-majority country.

Abdillah also was charged with plotting to assassinate President Susilo Bambang Yudhoyono — referred to by most Indonesians as SBY — after the bombings. He acknowledged to reporters outside court Wednesday that he helped develop the plan.

"Yes, SBY was the target," he said.

Asked if he had any regrets, he responded: "If I were punished, that would be wrong. Only Allah knows."

Abdillah, who prosecutors say was a driver for the late Southeast Asian militant leader Noordin Top, was arrested a month after the attacks as the first suspect in the case. If convicted, he could be sentenced to death.

Following his arrest, Abdillah's tips led to the arrests of several other suspected terrorists and two deadly raids in Central Java that killed four suspects, including a florist at the J.W. Marriott who had facilitated the attacks.

In court, chief prosecutor Totok Bambang said Abdillah met with Noordin and other terrorists to plan the hotel bombings and help craft a plot to kill the president. He accused Abdillah of preparing explosive materials for the bombs used in the hotel attacks and for a bomb the terrorists had planned to place in Yudhoyono's car.

Bambang said Abdillah wanted to kill the president because he gave permission to execute three Islamist militants behind the 2002 Bali bombings that killed 202 people.

Malaysian-born Noordin, who was shot dead in a gunbattle with police on Sept. 17, was blamed for a string of terrorist attacks in Indonesia that killed more than 250 people.

In all, police have killed six and arrested more than a dozen suspects including Saudi citizen Ali Mohammad Abdillah, who is accused of helping finance the bombings.

The trial was adjourned until next week. (AP)