Tunisia's Islamist-dominated constituent assembly has compromised in rejecting Islam as the main source of law as it voted on a new constitution for the country that spawned the Arab spring.
But while it established Islam as the state religion, it promised freedom of conscience, despite one MP warning on Saturday that "satanists" and "idolaters" would be practicing in public and criticism by a rights group it was too vague.
Saturday's sitting of the National Constituent Assembly, which has adopted 12 out of 146 articles, came amid concerns a January 14 deadline for the charter's approval could be missed because of disruptions and the slow pace of deliberations.
It was on January 14, 2011, that ousted dictator Zine El Abidine Ben Ali and his family fled the country for exile in Saudi Arabia.
The first two articles adopted, neither of which may be amended, establish Tunisia as a "civil" republic based on the rule of law and with Islam as its religion.
The assembly rejected two amendments, one proposing Islam and the other proposing the Koran and Sunna - the sayings, acts and judgments of the Muslim Prophet Mohammed - as "the principal source of legislation".
In what was a raucous session that had to be suspended at one point, Mohamed Hamdi of the small Current of Love party defended Islamic law, saying it would give "spiritual backing to all rights and liberties".
But Mahmoud Baroudi, of the secular Democratic Alliance, said the proposed amendments were "against modernity".
Another key precept adopted, Article 6, makes the state the "guardian of religion," "protector of the sacred" and guarantor of "freedom of conscience".
It would also place mosques and other places of worship out of bounds to political activity.
Yet the Tunisian League of Human Rights was uncomfortable with Article 6. It argued that defining the state as protector of religion and guarantor of things sacred is vague and open to interpretation, which could threaten freedoms.
Approving the new constitution will be a crucial democratic milestone.
Its adoption would end months of political crisis and further distance Tunisia from the chronic instability plaguing other countries in a region rocked by regime change.
The assembly is expected to return to its work on Sunday morning.
To be adopted, the constitution will need approval by two-thirds of the assembly's 217 members. Otherwise, it will have to be put to a referendum.