LONDON (AP) – President Barack Obama went from Shakespeare to Harry Potter during his visit to London.

The boy wizard’s creator, J.K. Rowling, was among guests who were dining with Obama at the U.S. ambassador’s London residence Saturday. Earlier the president visited Shakespeare’s Globe Theatre to mark the 400th anniversary of the playwright’s death.

Rowling spokeswoman Rebecca Salt confirmed Sunday that the author attended a private dinner with Obama. British Prime Minister David Cameron was also among the guests.

If Shakespeare is Britain’s greatest-ever writer, Rowling is its most successful living one. Her Potter books have sold more than 400 million copies worldwide.

Rowling has met the president several times, and attended a banquet thrown by Obama and his wife for Queen Elizabeth II when the U.S. first couple visited Britain in 2011.