Members of a moderate Muslim sect were ordered by the government Monday to return to mainstream Islam or face possible imprisonment for insulting the country's predominant religion.

Critics may see the step as a failure by the government of President Susilo Bambang Yudhoyono to uphold the young democracy's secular values as it struggles to define its Muslim identity after decades of dictatorship.

The vast majority of Indonesia's Muslims are moderate, but in recent years an extremist fringe has grown louder. The government, which relies on the support of Islamic parties in Parliament, has been accused of caving in to their demands.

The document signed Monday by two Cabinet ministers and the attorney general "orders all Ahmadiyah followers to stop their activities" or face up to five years in prison.

Indonesia's constitution guarantees freedom of religion, but many in the nation of 235 million consider it offensive that the sect does not recognize Muhammad as the last prophet.

"Is it still safe for us in this country?" Ahmadiyah spokesman Syamsir Ali said in an interview with national broadcaster tvOne. "Our houses are being targeted and those who don't like us feel it is acceptable to spill our blood."

Ali said he hopes Indonesia doesn't "turn out to be like governments in the Middle East" where the movement is prohibited.

Hard-liners have attacked Ahmadiyah members and torched their mosques since the government said in April it was considering banning the faith. Several dozen religious tolerance activists were beaten at a rally in Jakarta just over a week ago while police stood by.

A spokesman for the radical Islamic Defenders' Front — which has a long record of arson, stoning and vandalism against opponents and Western targets — said the decree falls short of its demands.

"It is not enough. We will keep up the struggle until the president orders the disbandment of Ahmadiyah," he said in a telephone interview.

Earlier Monday, several thousands protesters wearing white Islamic robes and caps gathered outside the presidential palace to demand that the organization be outlawed.

The religion needs to be defended "from people who want to destroy Islam's teachings," said demonstrator Zairin, who like many Indonesian goes by a single name. The use of violence would be justified to force reluctant Ahmadiyah members to renounce their faith and "keep Islam pure," he said.

Ahmadiyah, established in 1889 in Punjab, India, considers its founder Mirza Ghulam Ahmad to be a prophet and messiah, counter to traditional Islamic teaching. Ahmadiyah has millions of members around the world, with an estimated 200,000 in Indonesia.

"As long as they say they are Muslim, they have to follow Islamic teaching that does not recognize the existence of another prophet after Muhammad," Attorney General Hendarman Supanji told reporters in the capital.

Religious Affairs Minister Maftuh Basyuni, one of the ministers who signed the decree, said it "is not an intervention into someone's faith, but to maintain order and safety."

The decree also called on radicals "to restrain from violent acts against Ahmadiyah."