The Secret Country by Pamela Dean

Each vacation for the past nine years, cousins Patrick, Ruth, Ellen, Ted, and Laura have played a game they call the “Secret”—and invented, scripted world full of witches, unicorns, a magic ring, court intrigue, and the Dragon King. In the Secret, they can imagine anything into reality, and shape destiny. Then the unbelievable happens: by trick or by chance, they actually find themselves in the Secret Country, their made-up identities now real. The five have arrived at the start of their games, with the Country on the edge of war. What was once exciting and wonderful now looms threateningly before them, and no one is sure how to stop it… or if they will ever get back home.

"An intricate sparkling web of intrigue and magic. One of me very favorites.”—Patricia C. Wrede, author of Dealing with Dragons