Updated

"Dear Evan Hansen," the touching, heartfelt musical about young outsiders, has won the biggest theater popularity contest — winning the best new musical trophy at the Tony Awards along with five other statuettes, including best score, book and top actor honors for Ben Platt.

The show came into the night as the second-leading Tony nominee but ended up on top, with a revival of "Hello, Dolly!" starring Bette Midler next with four Tonys. "Oslo," a three-hour meditation on diplomacy, was named best play.

Midler took the best actress trophy and — to the amusement and cheers of the audience — refused to be played off, forcing the swelling orchestra into silence. "This has the ability to lift your spirits in these terrible, terrible times," she said of her show.

"Dear Evan Hansen" came into the night behind "Natasha, Pierre & The Great Comet of 1812" with 12 nominations, but that musical which dramatizes a 70-page slice of Leo Tolstoy's "War and Peace" stalled after winning just two technical awards earlier, for best set and lighting.

Instead, the night belonged to "Dear Evan Hansen," a show that centers on a profoundly lonely 17-year-old who fabricates a prior friendship with a classmate who has just committed suicide.

Platt thanked his cast mates, crew and family, calling his parents his heroes. He had this inspiring message to young people out there: "The things that make you strange are the things that make you powerful."

Benj Pasek and Justin Paul, who recently won Oscars for the song "City of Stars" from the movie "La La Land," added to a remarkable year by earning Tonys for best score for writing the songs for "Dear Evan Hansen."

Moments later, the show's story writer, Steven Levenson, won the Tony for best book, and Alex Lacamoire earned one for best orchestations. Rachel Bay Jones won her first Tony for her work in the musical, capping a long career onstage with plenty of zigs and zags.

Cynthia Nixon won her second Tony, this time for her work in Lillian Hellman's "The Little Foxes." Nixon, the "Sex and the City" star, struck a defiant political tone, saluting those who refuse to stand around and watch bad things happen in the world.

Kevin Kline won his third Tony Award playing an egomaniacal matinee idol in the midst of personal turmoil in the play "Present Laughter." He thanked, among others, the National Endowment for the Arts and the National Endowment for the Humanities. Andy Blankenbuehler won his second choreography Tony in as many years — last year for "Hamilton" and this time for "Bandstand."

Laurie Metcalf won her first Tony, winning best actress honors in "A Doll's House, Part 2." She won three Emmy Awards for her role as Jackie Harris on "Roseanne" and thanked her children. Rebecca Taichman won best directing play honors for "Indecent."

"Am I dreaming? Is this some kind of crazy dream?" she asked.

Kevin Spacey kicked off his first-ever Tony Award hosting gig with grace and self-deprecating wit, dancing, singing and joking his way through an opening number that linked all four best new musical nominees and doing his best Glenn Close impersonation.

Spacey, who was named Tony host after several other celebrities turned down the job, laughed at himself in the 10-minute opening song, in which he gradually grew comfortable with hosting duties despite what he fears will be nasty tweets crashing down.

The telecast opened on a mournful host dressed like the title character in "Dear Evan Hansen" — complete with arm cast — before he soon showed up in a bed to mock "Groundhog Day The Musical" with an assist with Stephen Colbert, and then donning a fake beard as if he was in "Natasha, Pierre & The Great Comet of 1812." He went on to do impersonations of former President Bill Clinton and Johnny Carson.

The show's comedy had zings for Democrats and Republicans alike, with Colbert mocking President Donald Trump as if he were a show from Washington with bad hair and makeup that will be "closing early" due to poor reviews. Spacey, as Clinton, joked about his wife's fake email accounts.

In an attempt to shake up the show, producers asked the Rockettes back on a Tony stage after 13 years and asked all four playwrights nominated for best play Tonys appear to present their works.

The Rockettes had their own number and got to dance with the cast of "Come From Away," a feel-good Canadian musical set against the horror of 9/11. It earned Christopher Ashley the Tony for best direction of a musical. He dedicated it to 9/11 first responders and all those who were generous on that terrible day.

Spacey even had fun with rumors about his sexual orientation while singing the Andrew Lloyd Webber song "As If We Never Said Goodbye" from "Sunset Boulevard." Spacey, dressed as Close, sang "I'm coming out..." and then paused, tantalizingly. "Of makeup..."

Then Spacey led a line of high-kicking, tap dancers in a top hat, a white tie, tuxedo and a cane. "I'm Broadway bound," he sang. "Your next host is found." After the hectic number, he requested that his cardiologist be nearby.

The year after "Hamilton" took many prizes, Spacey jokingly pointed out that the subjects on Broadway this season included infidelity, suicide, greed, 9/11 and economic upheaval. His Frank Underwood from "House of Cards" made a late appearance, striding onto the stage with his TV wife played by Robin Wright. Later, he and Patti LuPone closed the show with a lovely duet of "The Curtain Falls" by Bobby Darin, a role he played onscreen.

Other winners included August Wilson's "Jitney," which drove away with the Tony for best play revival. Gavin Creel won his first Tony for featured actor in a musical in "Hello, Dolly!"

There were no technical or human snafus — other than Midler's elongated speech — that marred previous awards shows this year, including the wrong winner announced at the Oscars and sound issues at the Grammys. Spacey talked about the show's accountants and said: "You guys do not have to worry about them tonight, at all," he said.