A man using the British Library's wi-fi network was denied access to an online version of Shakespeare's Hamlet because the text contained "violent content".
Author Mark Forsyth was writing his book in the library, and needed to check a line from the famous play.
The British Library said the fault was caused by a newly installed wi-fi service from a third-party provider.
One security expert said the incident highlighted the "dysfunction" of internet filters.
Mr Forsyth revealed on his blog that the filter had logged his attempt to access the page.
A spokesperson for the British Library said Hamlet had since been made accessible.