St John's College says man was asked to leave after failing to prove he was entitled to use library

The library at one of Cambridge University's largest colleges has been playing host to a mysterious user with a collection of supermarket bags, vague claims of doing a doctorate on religion and a habit of dozing off.

The unexpected visitor was the subject of speculation at St John's College over several weeks, according to students, before he was asked to leave by staff after failing to show that he was entitled to use the library or the college's other ancient premises.

Access to St John's "working library", which is separate from the 17th-century Old Library where rare books are kept, is available 24 hours on a card access system which means that students are often going in and out. The man is thought to have slipped in during busy periods, including at least one visit late at night. Other students told the paper that he was thought to be homeless and the incident has highlighted the issue in the city, which has serious problems in providing emergency overnight beds. A report late last year suggested that attacks on homeless people had also increased by five times in the previous 12 months.

The college, whose alumni include six prime ministers and three Catholic saints, said: "The presence of a male in the library was reported to the porters who asked him to leave when he was unable to identify himself as a student of the college. He has not been seen in St John's subsequently."

Historically, St John's has reason to be sympathetic: a former master, Dr James Wood, was so poor as an undergraduate that he slept in straw in his unheated room, couldn't use candles as a result and so studied on the staircase outside.

The episode's tweets included one suggesting that the man had managed to make visits "under the radar" for six weeks and another from the college's May Ball committee quipping that he was no doubt wanting to buy tickets. At £310 for a pair, this might be flippant, but profits from the grand event will at least be shared with the Cambridge homeless charity, Jimmy's.

• This article was amended on 18 March 2013. The original said that St John's is the largest college at Cambridge. This has been corrected.