Catalonia's parliament on Thursday rejected a move to ban the wearing of the Islamic burqa in public places across the Spanish region after reversing an initial vote.
A resolution moved by conservatives and centre-right nationalists was passed, but opponents said there had been a technical error and some absentees at the moment of the vote.
After the session was suspended, the parliamentary speaker ordered the vote to be put again, prompting a walk-out by the motion's supporters and a victory for its left-wing opponents.
The motion would have called on the government of the northeastern region to ban the Islamic women's garment which conceals all but the eyes, in the street as well as in public buildings.
Right-wing deputy Rafael Lopez said it was a question of values, of voicing opposition to clothing which he said kept women in a "degrading prison."
Left-wingers said they did not approve the wearing of the burqa but called the motion politically-motivated with regional elections coming up this year.
Nine municipalities in Catalonia, including Barcelona, have banned the use of face-covering Islamic veils in public or are considering doing so.
Human rights group Amnesty International had called on the Catalan deputies to reject the motion.
"Any wide-ranging ban will violate the rights to freedom of expression and religion of those women who choose to wear a full-face veil as an expression of their identity or beliefs," said John Dalhuisen, Amnesty International's expert on discrimination in Europe.
"Women should be free to choose what and what not to wear. This is their right under international human rights law."
Spain's upper house of parliament last week approved a motion calling on Prime Minister Jose Luis Rodriguez Zapatero's Socialist government to ban the Islamic veil in public.
Earlier this month Justice Minister Francisco Caamano said the government planned to restrict the wearing of the veils in public places under a proposed new law on religious freedom.
Immigration from Muslim countries has grown in Spain since the 1990s, with Catalonia in particular being home to a large community of Pakistani origin.
There are now about one million Muslims among Spain's population of 47 million.
Last month, lawmakers in Belgium approved a draft law to ban the wearing of the burqa in public places, including streets -- creating a controversial first for Europe, although it is still subject to a senate vote.
Debate is raging in France as well, where the cabinet has approved similar legislation, opening the way for the bill to go before parliament this month.