The Turkish first lady praised the Ottoman-era harem as an educational center that prepared women for life - the latest in a string of controversial remarks by Turkish dignitaries on women's roles.

At a speech delivered during a meeting on the mothers of Ottoman rulers, Emine Erdogan, wife of President Recep Tayyip Erdogan, said that contrary to western perceptions, the harems were 'schools and educational establishments' for women where they organised their charity work.

The comments were made as Turkey forces a deal that could let its 77 million citizens come to continental Europe without needing visas, in return for taking back all migrants landing in Greece.

Mrs Erdogan's description of harems will add to concerns that the Muslim nation's attitude to human rights and the treatment of refugees will make the deal illegal under international law.

Turkey's President Recep Tayyip Erdogan and his wife Emine Erdogan have both angered campaigners with their controversial remarks in recent days

An EU report published in November said Turkey’s commitment to joining the EU was ‘offset’ by domestic actions that ‘ran against European standards’.

It highlighted criminal cases against journalists and writers, intimidation of media outlets and changes to Internet law.

Last Friday Turkish police raided the offices of Zaman, a top-selling newspaper critical of the government.

According to Turkish television stations, during the official event on the Ottoman sultans in Ankara, she said: 'The harem was a school for members of the Ottoman dynasty and an educational establishment for preparing women for life'.

The comment sparked a fierce backlash on social media, with many taking to Twitter to express their anger at the remarks.

Twitter user @GaziCaglar wrote: 'Receiving education in harem doesn't make it a school. This is nonsense,' while @anlam75 asked, if the harem was a scholarly institution then 'why were the men who worked there castrated?'

While harems did provide women with an education, teaching them calligraphy, decorative arts, and music, many of them were kept as slaves.

The first lady's comment was the second controversial remark to come from the Erdogans in as many days.

Her comments came just one day after her husband caused outrage in a speech to mark International Women's Day, when he said a woman was 'above all a mother'.

His speech prompted thousands to march through Istanbul in uproar on International Women's Day - which is globally observed on March 8th to highlight the struggles of women across the globe and promote women's rights.

At a speech during a meeting on the mothers of Ottoman rulers, Emine Erdogan said harems were 'schools and educational establishments' for women and places from where they organised their charity work

Her remarks sparked a backlash on social media, and came just one day after her husband said a woman was 'above all a mother'

Erdogan has previously upset women's right advocates by saying that men and women are not equal, and labelling birth control a 'treason'.

Turkey ranks 77th out of 138 countries on a United Nations Development Programme (UNDP) index of gender equality.

On Sunday, Turkish police detained at least one woman and fired rubber bullets to disperse a crowd of hundreds of people trying to mark International Women's Day in central Istanbul.

Emine Erdogan delivering her speech in Ankara, Turkey. While harems were known to provide women with an education, many of them were kept as slaves

The group, which gathered two days before official commemorations, had ignored a ban on the march by the Istanbul governor who scrapped this year's rally, citing security concerns.

The government frequently faces criticism for its handling of women's issues, including the failure to stem high rates of violence and low female participation in the workforce.

Violence committed by domestic partners is 10 times more likely in Turkey than in other European countries, according to the U.N.

Hundreds of women filled the square in the Kadikoy district on the Asian side of Istanbul chanting slogans and carrying purple banners, the hallmark of a movement centred on women's social and economic issues.

Plainclothes police began shoving members of the group, and many women fled the square when riot police fired rubber bullets into the crowd.

'We have always said that we would never leave the streets for the March 8 demonstration, and we never will. Neither the police nor the government can stop us,' protestor Guris Ozen said before the crackdown.

'You see the power of women. We are here despite every obstacle and we will continue to fight for our cause.'

The harem: Left, a 19th century ceramic of musicians and dancers in the Court of Nasir al Din Sah and right, A Harem Scene by Giacomo Mantegazza