Libya's ruling National Transitional Council (NTC) has issued a new law that bans parties that are based on religious principles, the council spokesman said.
The law, which was passed on Wednesday, comes two months ahead of the country's first general elections to choose a 200-member assembly tasked with writing a new constitution and forming a government.
The surprise move was immediately denounced by Islam-oriented parties that are preparing to compete in the June elections.
NTC spokesman Mohamed al-Hareizi said the provision, included in a law which governs the formation of political parties, was designed to preserve "national unity".
"Parties shouldn't be based on ethnic or religious ideologies," he said. "We don't want the government to be divided by these ideological differences."
He did not make clear how this would affect a political party formed in March by Libya's Muslim Brotherhood and other religious groups.
The new party was expected to make a strong showing in the election, the first since last year's overthrow of Muammar Gaddafi in a NATO-backed popular uprising.
"This is not democracy," said Mohamed Gaira, spokesman for the Freedom and Development party founded by the Muslim Brotherhood earlier this year.
"We don't understand this law ... It could mean nothing, or it could mean that none of us can participate in the election,'' he added.
"We are a nationalist party and Islam is our religion. This law is unacceptable and only suits liberals."
Mohamed Sawan, the head of the Freedom and Development Party, said the NTC needed to make it clearer what it meant by banning religious parties.
He said this would cause controversy in conservative Libya, whose population of six million is made up almost entirely of Sunni Muslims.
"This kind of clause is only useful in countries where there exists many religions, not in Libya where most people are religious Muslims," Sawan told Reuters.
"This law needs to be reviewed by the NTC and if it's not changed, we would have to protest it."
Libya's NTC has already indicated that the country will be run in accordance with sharia, though the exact place of Islamic law in the legal system will be settled only once a new constitution is written after elections.
Political analysts have said the Muslim Brotherhood is likely to emerge as Libya's most organised political force and an influential player in the oil-exporting state where Islamists, like all dissidents, were harshly suppressed during the 42 years of Gaddafi's dictatorial rule.
Islamic political parties have performed strongly in post-uprising elections in Tunisia, Egypt and Morocco since October and they are also likely to do well in Libya, a socially conservative country where alcohol was already banned before the 2011 revolution.