Jakarta - An Indonesian on trial for a foiled plot to bomb the Myanmar embassy confessed to being the mastermind on Thursday, saying he was “still at war” with anyone oppressing Muslims.

Sigit Indrajid, 23, testified that he led a group of Islamic extremists that networked over Facebook in a plan to attack Myanmar's mission in Jakarta in May.

The group wanted to avenge the harsh treatment of Muslim-minority Rohingya in Myanmar - an issue that has resonated widely in Indonesia, the world's biggest Muslim-majority nation.

“It was my initiative,” he told the South Jakarta district court.

Asked by a judge if he regretted his actions, Indrajid responded in a raised voice: “No. This was a warning to Myanmar as well as others who treat Muslims as they please.”

“I am still at war - as long as there is oppression of Muslims,” he said.

Indrajid faces three charges under tough anti-terror laws, including possession of weapons or explosive materials, which carries a maximum penalty of death.

He said he became incensed after reading reports on Facebook about the violence against Rohingya in the Buddhist-majority country, many of whom have died in sectarian unrest since last year.

He got the idea to attack the embassy after being invited by a local Muslim group to take part in a protest against the violence in Myanmar.

He said he met up with an accomplice, Separiano, who goes by one name and has also been charged by the same court over the plot.

“I said to him, 'Let's just bomb (the embassy)'. And he agreed,” Indrajid told the court.

The attack by the group - part of the network Negara Islam Indonesia (The Islamic State of Indonesia) - was foiled on May 2, the day before it was due to take place, when police arrested two men on a motorbike carrying a backpack full of pipe-bombs.

Prosecutors earlier said Indrajid met some of his accomplices on Facebook, where he posted messages about the need to avenge the killing of the Rohingya.

There have been a string of attacks on minority Muslims in Myanmar since last year, mostly in the Rohingyas' western home state of Rakhine. Scores have been killed and tens of thousands made homeless.

Indonesia was rocked by several fatal terrorist attacks in the last decade or so, but a clampdown on militancy has disabled some of the deadliest networks and only low-impact attacks have been carried out in recent years. - AFP