Universities have been warned of a “creeping segregation” on campus after Sheffield became the first in the country to open student housing where only gay and transgender students are allowed to live.

Sheffield University says it will open a set of LGBT-only student flats in September to provide a “safe space for students to be themselves”.

The university has received 30 applications so far and plans to expand the accommodation next year beyond the 12 rooms currently offered.

It follows concerns from the student union that gay and transgender students will be subject to “bullying and harassment” in mainstream accommodation.

A report from gay rights group Stonewall this year found that 42 percent of LGBT students in the UK are forced to hide their sexuality at university, and 33 percent have received “negative comments” from other students.

But the director of the country’s largest student accommodation service criticised the plan as a form of “segregation” which will ghettoise gay youth and divide student communities.