Lin-Manuel Miranda has declared his independence from “Hamilton,” the creator-star’s Pulitzer- and Tony Award-winning musical of the Revolutionary War and its aftermath. For the vast bulk of the 26 previews and 387 performances as of Saturday, his final night, the 36-year-old Miranda has played so riveting an Alexander Hamilton that public reaction to his show helped keep that Founding Father on the $10 bill.

Fellow stars Leslie Odom Jr. (Aaron Burr) and Phillipa Soo (Eliza Hamilton) also made their exits.

Outside the Richard Rodgers Theatre — where tickets for the 1,319-seat venue’s final Miranda performance were listed on reseller sites for as high as $20,000 apiece — a crowd of hundreds massed as police amiably but sternly kept onlookers behind barricades and kept the front of the theater clear for an audience line that stretched completely through the Marriott Marquis alley from West 46th to West 45th Street.

“I came to see Broadway history,” said Andrew Sapienza, 35, of Elmont, one of the fortunate ticket holders to Miranda’s finale. “I came just for that final applause,” he said. “To be in the room where it happens.”

He was in good company: Among the late-arriving audience members were music star Jennifer Lopez and her two young twins, along with newsman Charlie Rose and Secretary of State John Kerry. Also on hand were actresses Jane Fonda and Rosie O’Donnell and filmmaker Spike Lee.

“I wanted to get a glimpse of Lin-Manuel and all of them [cast members] here who’ve had a great run,” said Manhattanite Derrin Stull, 25, who has entered the 10-dollar ticket lottery every day but has yet to win one of the coveted ducats. Miranda, he says, “changed Broadway for a lot of people. It’s really cool that he infused hip-hop” into the traditional Broadway musical. “I have a lot of friends who were never into Broadway and now they love it.”

René Cruz, 54, a theater professional from Santa Monica, California, is seeing the show a second time, and specifically bought a ticket to this last Miranda performance. Was it difficult? “It’s easy if you pay,” he said with a chuckle.

Javier Muñoz, Miranda’s longtime alternate, whose performances have earned him the sobriquet “the sexy Hamilton,” takes over the title role of Alexander Hamilton on Monday.