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 night, 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, Oscar-winner Jane Fonda, newsman Charlie Rose, comic Rosie O’Donnell, filmmaker Spike Lee, “Law & Order: SVU” star Mariska Hargitay, “Breaking Bad” star Aaron Paul and Secretary of State John Kerry.

“It’s been incredible. When Lin-Manuel Miranda came out there was a 30-second ovation,” said Nick Klopsis, 26, of Oakdale, during intermission. “The atmosphere is great; it’s electric. There was a huge ovation for John Kerry; he gave a wave to the crowd.”

advertisement | advertise on newsday

Kathleen Cadunz of Manhattan was seeing it for the second time, after having attended the premiere. “There was a huge standing ovation for Lin-Manuel,” she said during intermission. “It wasn’t like that on opening night. It was intense.”

René Cruz, 54, a theater professional from Santa Monica, California, was 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.

“It was amazing being in the front row and seeing everybody making eye contact with you, and seeing the cast interact with each other,” said Michelle Foronjy, 27, of Nesconset, who won $10 “Hamilton” daily lottery tickets and sat in the front row. “Lin cried during [the climactic song] ‘The Battle of Yorktown.’ ”

The curtain call was surprisingly short, according to her and others after the show, lasting only about two minutes. But they were emotional minutes. “Chris Jackson, who plays Washington, leaned Miranda forward [from the line of actors] and the orchestra started playing the theme from ‘The West Wing’ because Miranda’s such a huge fan,” Foronjy said. Miranda became visibly teary and finally waved his left forefinger in the air in a let’s-wrap-it-up gesture.

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.

With Wendy Lu