LONDON—An American tourist, who accidentally got locked inside a London bookstore late Thursday night after the store had closed, eventually tweeted himself to freedom.

See also: Twitter Now Lets You Listen to Audio in App While Browsing Your Timeline

David Willis, from Dallas, Texas, was visiting the Trafalgar Square branch of the Waterstones bookstore a little before 9 p.m. and at some point reportedly wandered upstairs to use the free Wi-fi. When he came back downstairs a little while later, he realized that the store had closed, the staff had left and the store had been locked.

At 10:11 p.m., he tweeted this Instagram picture of his captivity.

Loading This is me locked inside a waterstones bookstore in London. I was upstairs for 15 minutes and came down to all the lights out and door locked. Been here over an hour now. Supposedly someone is on their way. #nofilter #london View on Instagram

A little less than an hour later, he tweeted at Waterstones, saying he'd been locked inside the bookstore for 2 hours and would like to get out.

Hi @Waterstones I've been locked inside of your Trafalgar Square bookstore for 2 hours now. Please let me out. — David Willis (@DWill_) October 16, 2014

By Friday morning, Willis had earned the hashtag moniker #waterstonestexan and his cry for help had been retweeted more than 9,000 times — with some users giving helpful tips on what books to read while trapped inside and others offering less charitable responses.

Willis had reportedly both triggered an alarm and called the police. But it was only after an employee at Waterstones saw his tweets, that someone came to let him out.

At 12:24 a.m., he could send this triumphant tweet: 'I'm free.'

I'm free — David Willis (@DWill_) October 16, 2014

"I’m very tired, I did not sleep very much last night but it feels good to be free," he later told ITV News in London.

Waterstones also announced that Willis had been freed via Twitter.

We're pleased to announce that @DWill_ is a free man once more. Thanks for your concern and tweets! — Waterstones (@Waterstones) October 16, 2014

By Friday morning, the bookseller had turned Willis' time in captivity into a publicity campaign, retweeting Willis' original Instagram picture with a suggested reading list for what to read 'when you’ve two hours on your hands… and are locked in a bookshop.'

What to read when you’ve two hours on your hands… and are locked in a bookshop. http://t.co/vA1oB4fDKh pic.twitter.com/80MDGLwfiR — Waterstones (@Waterstones) October 17, 2014

Other bookstores, however, were quick to respond on Twitter, too. The well-known bookseller Foyles tweeted this image of an unknown reader: