President Hosni Mubarak of Egypt has intervened in a growing row in his country over France's decision to ban headscarves in state schools.
Sheikh Tantawi's comments have provoked a strong reaction in Egypt
The row erupted earlier this week when a senior Muslim cleric said he agreed that France should have the right to implement the ban.
Mr Mubarak appeared to support the sheikh's ruling, saying it was a French issue and Egypt could not interfere.
The sheikh's ruling has been angrily rejected by other Islamic scholars.
The president said the ban on religious symbols from state schools applied to all religions and not only to Muslims.
The Grand Sheikh of Al-Azhar mosque, Mohammed Sayed Tantawi, had said he agreed that France should have the right to implement the ban.
He said that although the wearing of headscarves was a religious duty, different rules applied to Muslims living inside Muslim countries and those living in non-Muslim ones.
"If a Muslim woman is in a non-Muslim country, like France, for example, whose officials want to adopt laws opposed to the veil, it is their right."
However, the Muslim Brotherhood, Egypt's largest opposition group with 16 seats in parliament, have strongly opposed the French ban and criticised Sheikh Tantawi's views saying they harmed the principles of Islam.
In a separate development, France's 5,000 Sikhs are asking India's prime minister to lobby for their traditional turbans to be exempted from the ban.
"This law will not just be against Muslims, it will be against Sikhs as well," said spokesman Chain Singh. "We cannot live without our
turbans. This is our religion. If we cannot wear them, we may
not be able to stay here."
The issue of headscarves has also provoked a strong debate in Germany.
Politicians and clerics have criticised President Johannes Rau's appeal that Islamic headscarves should receive equal treatment as other religious symbols of other faiths.
Headscarves are now causing debates in a number of countries
The Bavarian state prime minister, Edmund Stoiber, said the president had no right to cast doubt on the German identity which is distinguished by the Christian religion.
Chancellor Gerhard Schroeder himself has said that while he is opposed to public servants wearing Muslim headscarves, he was not against students doing so in schools.
The German federal constitutional court, the country's highest tribunal, has ruled that individual states could legislate to ban religious attire if it was seen to unduly influence children.