Turkey's parliament on Saturday approved constitutional amendments to ease a ban on Islamic headscarves in universities.

Legislators in the predominantly Muslim but secular country voted 403-107 in favour of a first amendment that will add a paragraph to the constitution stating that everyone has the right to equal treatment from state institutions.

They later voted 403-108 in favour of a second amendment stating "no-one can be deprived of [his or her] right to higher education."

The changes must be signed by President Abdullah Gul, an observant Muslim who is widely expected to approve them.

The changes were backed by Turkey's ruling party and the right-wing Nationalist Movement Party, but bitterly opposed by the secular establishment and the main opposition party, the Republican People’s Party.

"The head scarf is a political symbol," said legislator Canan Aritman of the Republican People's Party, which said it would appeal the changes. "We will never allow our country to be dragged back into the dark ages."

"You are not opening the door of freedom — you are shutting it forever for the girls," legislator Nesrin Baytok said. "The heads of many girls are shaved by their brothers to force them to wear headscarves."

After the vote, tens of thousands of people demonstrated in the capital, Ankara, against the amendments and called for the government's resignation.

"Turkey is secular and will remain secular," they chanted, many waving flags and banners of Mustafa Kemal Ataturk, Turkey's founding father and an ardent secularist.

Turkey banned head scarves in public places — including courts, state offices and educational institutions — after a 1980 military coup.

Prime Minister Recep Tayyip Erdogan said the ban was unfair to observant Muslim women. His government pledged to change the laws governing higher education to specify which head coverings will be allowed on campus and to ensure that students do not attend class in full-length chadors or burqas.

With files from the Associated Press