JK Rowling has praised fans for keeping the secrets of stage show Harry Potter and the Cursed Child.
Speaking at the gala opening at the Palace Theatre in London, the best-selling author said fans had been “amazing” at avoiding spoilers.
“It’s the most extraordinary fandom, so I’m not surprised… they didn’t want to spoil it for each other.”
Thousands of fans later queued outside bookshops across the world for the play’s script release at midnight.
Rowling said that she would like the new Harry Potter play to be seen widely around the world.
Asked if the show would head to Broadway, she told the BBC: “I’d love it to go wider than that. I’d like as many Potter fans to see it as possible.”
The story, by Rowling, writer Jack Thorne and director John Tiffany, is set 19 years after the seventh and final book in the series, the Deathly Hallows.
It portrays the stars of the Rowling’s wizarding saga as adults with their own children heading off to school.
Audiences had been urged to “keep the secrets” since the play – presented in two parts over five hours – began previews in early June.
It won a number of five-star reviews earlier this week, with one critic describing it as “a game-changing production”.
Rowling, Thorne and Tiffany joined the cast on stage as the audience gave a standing ovation at the close of part two of the play on Saturday night.
Speaking earlier, Tiffany said the play had “not massively changed” during the preview period.
“We’ve crystallised and evolved some of the illusions and costumes – all of the actors are still in it, I’m glad to say. It’s been great to see it develop in front of an audience.”
The script book of the play, billed as the eighth Harry Potter story, was published at midnight, with bookshops around the world holding late-night openings to allow fans to pick up their copies.
Waterstones said 140 of its shops were hosting Potter parties on Saturday night, with the largest events in Edinburgh, Manchester Deansgate and London’s Piccadilly.
About 700 people dressed as witches, wizards and magical creatures flocked to the Piccadilly store for its launch.
A spokeswoman said: “Our pre-orders have exceeded six figures – numbers we haven’t seen since the last Harry Potter book and we fully expect Harry Potter and the Cursed Child to be our best-selling book of the year.”
It is a similar story in the US where booksellers Barnes and Noble said the script had broken the pre-order record set by Harry Potter and the Deathly Hallows.
The Harry Potter books have sold more than 450 million copies since 1997 and been adapted into eight films.
Potter fans are also preparing themselves for spin-off film Fantastic Beasts and Where to Find Them, written by Rowling, which opens in November.