An Indonesian military commander has been replaced after photos emerged of members of the hardline Islamic defenders group training with soldiers.

The photos posted on the website of the Islamic Defenders Front (FPI) show the group's members participating in a boot camp with members of the Indonesian Armed Forces.

The FPI is a hardline group that wants the imposition of Sharia law across Indonesia, and has been campaigning against Indonesian minority groups, like Chinese Christians.

The photos posted on the website show the group's members participating in a boot camp. ( Supplied: FPI )

Its leader Habib Rizieq is openly racist and says non-Muslims should not be allowed to have any position of power over Muslims.

The FPI is encouraging the instability in Indonesia that has been fuelled by the blasphemy trial of Jakarta's Christian Governor Ahok.

After an uproar in Indonesia following the revelation that the military was apparently training the FPI, the Indonesian Army said it was part of a "Defend The State" boot camp that is open to anyone who wants physical and discipline training.

A military spokesman said the training was effectively a de-radicalisation program because it engaged with the hardliners.

But the furore has refused to die and the local military commander in Lebak, outside Jakarta, has been removed from his position — reportedly for not following protocol and getting permission to train the FPI members.