Scores of university halls of residences and lecture theatres in the UK were judged "at serious risk of major failure or breakdown" and "unfit for purpose", a secret database obtained after a legal battle by the Guardian reveals.

Some of the most popular, high-ranking institutions, such as the London School of Economics, had 41% of their lecture theatres and classrooms deemed unsuitable for current use, while Imperial ­College London had 12% of its non-residential buildings branded "inoperable". At City University, 41% of the student digs were judged unfit for purpose.

Universities argue they have spent hundreds of millions in refurbishment since the judgments were made two years ago and use some of the buildings for storage purposes only.

The government agency that holds the information, the Higher Education Funding Council for England (Hefce), was forced to reveal it after an information tribunal ruled in the Guardian's favour, agreeing that it was in the public's interest for the data to be made public.

Hefce is thought to have spent up to £50,000 trying to conceal the data from the Guardian, which requested it two and a half years ago. The newspaper's ­barrister, Aidan Eardley, said the case would make it harder for government agencies to withhold information in future.

The database, which aims to help universities compare the condition of their estate with their competitors, shows more than 90% of higher education institutions had at least 10% of their buildings judged below the "sound and operationally safe" category. One in 10 institutions had at least 10% of their estate judged inoperable and at serious risk of major breakdown.

Universities employ surveyors to judge the condition of their estate according to four categories: as new; sound and operationally safe; operational but in need of major repair and inoperable; posing a serious risk of major failure and breakdown.

The surveyors also record whether buildings are suitable for student living, teaching and learning under four more categories, from "excellent" to "unsuitable for current use".

Heriot-Watt University in Edinburgh, Leeds Metropolitan University and Nottingham Trent University had 42%, 36% and 21% respectively of their lecture theatres, libraries and all other non-residential buildings in the "inoperable" category.

City and Glamorgan universities had 41% and 26% respectively of their halls of residence deemed unfit for purpose. The LSE, Glasgow School of Art and the university of Bolton had 41%, 34% and 27% of their lecture theatres and classrooms billed in this category.

Property consultants who advise universities said that, at its most extreme, buildings deemed inoperable could break fire regulations, have leaks and rot.

The database revelations come a week after the government announced that university grants for capital projects, such as new buildings, would be cut by 14.9% in cash terms to £562m in 2010-11. Vice-chancellors have said they will have to shelve new building plans to make the cuts.

The LSE said it had spent more than £107m on new buildings while a spokesman for Imperial College said the institution had spent on average £100m annually over the last three years "to provide the highest quality facilities for its students and academic staff".

Heriot-Watt said it had undertaken a "full condition" check of its buildings that was particularly rigorous and that millions had been spent on upgrades since then.