The President of Austria has called for all women to wear headscarves in solidarity with Muslims to fight “rampant Islamophobia”.

Alexander Van der Bellen, the left-wing former Green Party leader who narrowly beat a far-right candidate to take office in January, said freedom of expression was a fundamental right.

“It is every woman’s right to always dress how she wants, that is my opinion on the matter,” he told an audience of school pupils.

“And it is not only Muslim women, all women can wear a headscarf, and if this real and rampant Islamaphobia continues, there will come a day where we must ask all women to wear a headscarf – all – out of solidarity to those who do it for religious reasons.”

Mr Van der Bellen was responding to a question from a schoolgirl who argued a ban on Islamic headscarves or veils would reduce women to their appearance, rather than accomplishments, and shut some out of the labour market.

His comments were made in March but emerged after being broadcast on Austrian television, amid debate in the country and neighbouring Germany about “burqa bans”.

A spokesperson said that following Isis-linked terror attacks across Europe, Mr Van der Bellen would like to see Muslim representatives in Austria make “clearer statements” emphasising that the atrocities could not be justified within Islam.

Right-wing candidate defeated in Austrian presidential election

“He also warned against ‘racism from the other side’, giving the example of a Muslim taxi driver refusing to take Orthodox Jews,” a statement said, adding: “This is absolutely unacceptable.”

The President’s office said he believed prohibitions were only justified in select circumstances, such as for female judges, where religious dress could raise questions over their professional neutrality.

Mr Van der Bellen would apply any restrictions to all religious symbols equally, including Christian crosses and Jewish kippas.

Despite the President’s left-wing background, the Austrian government is a coalition between the centrist Social Democratic Party and conservative Austrian People's Party.

The populist Freedom Party of Austria has pushed for policies including a partial ban on full-face Islamic veils in courts, schools and other public places, which was announced in January.

The partial prohibition, which has not yet come into effect, would apply to the niqab and burqa but not headscarves (hijabs), which cover the hair and neck only.

But the government also agreed to prevent police officers, judges, magistrates and public prosecutors from wearing headscarves in the interest of appearing “ideologically and religiously neutral”.

Refugees march from Hungary to Austria Show all 10 1 /10 Refugees march from Hungary to Austria Refugees march from Hungary to Austria Refugees march from Hungary to Austria Migrants walk in a long line along the highway near Budapest, Hungary, Friday, Sept. 4, 2015 AP Refugees march from Hungary to Austria Refugees march from Hungary to Austria Migrants walk on the railway tracks between Bicske and Szar, some 40 km west of Budapest, Hungary, 04 September 2015 EPA Refugees march from Hungary to Austria Refugees march from Hungary to Austria The destination for most of those walking is reportedly Austria AP Refugees march from Hungary to Austria Refugees march from Hungary to Austria Most refugees have come to Hungary through the southern border with Serbia AP Refugees march from Hungary to Austria Refugees march from Hungary to Austria People walk in a long line along the highway near Budapest, Hungary AP Refugees march from Hungary to Austria Refugees march from Hungary to Austria Over 150,000 people seeking to enter Europe have reached Hungary this year AP Refugees march from Hungary to Austria Refugees march from Hungary to Austria Refugees walk along Budaorsi Street on their way out of Budapest EPA Refugees march from Hungary to Austria Refugees march from Hungary to Austria Refugees hold up an EU flag as they on the highway out of Budpest AP Refugees march from Hungary to Austria Refugees march from Hungary to Austria Refugees exit Budapest AP Refugees march from Hungary to Austria Refugees march from Hungary to Austria Hundreds of migrants walk after leaving the transit zone of the Budapest main train station AFP

Thousands of people took Vienna’s streets to protest the proposed legislation, which was dismissed as a knee-jerk reaction to appease the far-right as the coalition floundered.

Debates over restrictions on Islamic veils have reignited in Europe following a wave of terror attacks and the refugee crisis, which sparked concern over integration.

The German parliament voted in support of a draft law banning women working in the civil service, judiciary and military from wearing the burqa and niqab on Thursday.

Thomas de Maiziere, the German interior minister, argued that the ban was compatible with integration, which “means that we should make clear and impart our values and where the boundaries of our tolerance towards other cultures lie”.

Angela Merkel announced her support for the move in December, saying full-face veils were “not acceptable in Germany” and calling them to be banned “wherever it is legally possible”.

Dutch MPs voted for a similar prohibition in the Netherlands last year, covering public transport, education, healthcare and government buildings and punishing any infractions with fines.