An American tourist found himself locked inside a London Waterstones bookshop for two hours after it closed while he was still browsing.
David Willis, from Texas, got trapped in the branch in Trafalgar Square, on Thursday night.
Police were called after he let people know of his situation on Twitter and someone came to let him out.
When he was finally released, he tweeted: "I'm free." Branch manager Matt Atkins said they were "mortified".
'Please let me out'
Mr Willis said he had been upstairs in the shop for 15 minutes and when he came down all the lights were out and the doors locked.
He posted a picture of himself on Instagram behind shutters with the message: "This is me locked inside a Waterstones bookstore in London."
In a later post, which by Friday afternoon had been retweeted by more than 12,000 people, he tweeted: "Hi Waterstones, I've been locked inside of your Trafalgar Square bookstore for two hours now. Please let me out."
He received hundreds of replies, with many people asking him if he was taking the opportunity to read some books, others saying they would love to be locked in a bookshop and more than one suggesting he should build a fort out of books.
Eventually Waterstones posted a message on its Twitter feed saying: "We're pleased to announce that Mr Willis is a free man once more. Thanks for your concern and tweets."
Mr Atkins later told the BBC they had received many messages from people saying they did not think it would be such a bad place to be locked in.
"We're mortified that this has happened," he said.
"This is not the sort of thing that we want to happen and obviously we'll investigate and deal with it.
"But, there are definitely worse places that you could be stuck in all night."
A Metropolitan Police spokesman said police were called at about 21:35 BST "by a man claiming to be locked inside a shop".
He added: "Officers attended and following the arrival of a keyholder the man left the building shortly after 11pm."
A graph produced by Twitter Reverb shows the volume of tweets on Thursday night about Mr Willis's escapades, reaching a peak of 227 per minute at 00:16.