One measure of its extraordinary stature: Its performance on the awards show was preceded by a videotaped tribute to the show from President Obama and the first lady, Michelle Obama. Mr. Obama, acknowledging that the idea of a hip-hop musical about a Treasury secretary at first sounded like a joke, said, “We all laughed, but who’s laughing now?” He called the show “a civics lesson our kids can’t get enough of.”

The show is successful not only artistically, but commercially — it is earning about $600,000 in profit every week on Broadway, and it is about to expand its reach, with a production opening in Chicago in September, followed by two North American tours and a London production. Soon after the Tony broadcast ended, a new block of tickets for the Broadway production went on sale.

Image Performers and presenters wore silver ribbons, a tribute to the Orlando shooting victims. Credit... Charles Sykes/Invision, via Associated Press

“Hamilton” won Tonys not only for best new musical, but also for Mr. Miranda’s book and score; Thomas Kail’s direction; Alex Lacamoire’s orchestrations; Andy Blankenbuehler’s choreography; Paul Tazewell’s costumes and Howell Binkley’s lighting design. And three of its performers won Tonys: Leslie Odom, Jr., who plays Aaron Burr, beat out Mr. Miranda, who plays Hamilton, in the race for best leading actor; Renée Elise Goldsberry, who portrays Hamilton’s sister-in-law Angelica, was named best featured actress in a musical, and Daveed Diggs, who plays both Marquis de Lafayette and Thomas Jefferson, won best featured actor in a musical.

The best new musical award was handed out by Barbra Streisand, who had not appeared on the Tony Awards stage since 1970, when she won a special Tony as performer of the decade. Dressed in a lacy shirt-and-vest ensemble, Ms. Streisand joked as she opened the envelope: “Thank God I picked the right outfit.”

The 2015-16 theater season was the most diverse in Broadway history, and the Tonys celebrated that distinction, particularly as it came during a year when Hollywood faced criticism for its failure to nominate any nonwhite performers for the Oscars. Of the 40 acting nominations, 14 went to black, Hispanic and Asian-American actors.

“Think of tonight as the Oscars, but with diversity,” Mr. Corden said at the start of the show, prompting raucous laughter. He joked, “It is so diverse that Donald Trump has threatened to build a wall around this theater.” And then, at the close of the segment, he brought out a multiethnic group of children, and, singing “This could be you,” replaced them with the equally diverse group of nominees for performances in musicals.