The cast of Hamilton perform onstage during Hamilton’s performance for the 58th Grammy Awards at the Richard Rodgers Theatre on February 15, 2016 in New York City. Photo: Theo Wargo/WireImage

“The whole point of a play is that it’s not on TV,” says Daveed Diggs, who plays both Thomas Jefferson and Marquis de Lafayette in Hamilton. “It’s live, and it’s really hard to create that and have it feel that way.” Yesterday, though, it had to be: At about 9:30 p.m., the Grammy Awards telecast cut from L.A. to the Richard Rodgers Theatre, and the cast leapt into a performance of the show’s opening number, “Alexander Hamilton,” as the cameras swooped and bobbed among them. I spent the afternoon on Monday watching as the cast and crew of Hamilton rehearsed to do just that — blocking, staging, framing, and preparing to introduce their smash hit to 25.3 million viewers.

The Grammys don’t often feature a musical act that’s not live onstage. (The last time in memory that this happened was when Amy Winehouse couldn’t secure a work visa in 2008 and appeared via satellite from London.) “Before this, the Hamilton cast had never performed a number on television, period,” says producer Jeffrey Seller. “We made an early decision that we would not be able to do justice to our production by taking it out of this theater. So when the Grammys originally expressed interest in our performance, we politely declined. We said, ‘We can’t get to L.A., we just won’t look good on your stage, and we won’t be good enough.’ It was the genius of the Grammys and producer Ken Ehrlich, who said, ‘What if we come to you?’ That was an idea we couldn’t help but be enthusiastic about: a number on TV, but in our own theater. The best Presidents’ Day gift ever!” Musical director Alex Lacamoire was so sure a performance wouldn’t happen that he had already purchased his plane ticket to Los Angeles.

Next came the decision of which song to perform. Lacamoire says that “The Schuyler Sisters” was a strong contender “because it’s fun and girl-centric,” but that the Grammys producers requested the show’s opener, “Alexander Hamilton,” instead. The Hamilton team was onboard: “We don’t believe in medleys,” Seller says. “We believe in giving people a substantive chunk. Given that this is our first television appearance, it made so much sense to introduce America to our show with the beginning of our show. And of course there’s that lovely rhyme, in that this was the first number Lin[-Manuel Miranda] performed from Hamilton, at the White House.”

There were relatively few modifications required to make the performance work for the television broadcast; Monday’s all-day rehearsal was really for working out how seven cameras would zoom around and among the cast, capturing the action — as Seller put it, “This is a graduate course in camera choreography.” The actual choreographer, Andy Blankenbuehler, had one of the harder jobs, though: “What I do for a living is make the frame happen — make the audience look specific places,” he says. “And so with the camera doing that for me, what Tommy and I are doing is looking at frames and saying, ‘That could have a bigger visual impact.’ Then we decide on the frame size, I push and pull spacing just so that you can still see other people.” (Hamilton’s director, Thomas Kail, recently managed a vastly larger version of this task for Grease: Live, on Fox.)

The complex staging of that opening number — in which Hamilton makes his way from his Caribbean hometown to New York to reinvent himself — wasn’t coming through the tighter view of the camera at first. “The ensemble’s dance steps are supposed to signify the workers on the dock — rigging the ship, tying the ship down,” he explains. “The original camera shot of it was skipping past their steps and only showing Burr on the staircase, so it was losing the imagery of the shipyard. So we rejiggered it so that the camera shoots through the dance step, and the action informs the location.”

During the four-hour-plus rehearsal, the cast bounced around, clearly enjoying each other. Miranda teased Renée Elise Goldberry (who plays Angelica Schuyler); Phillipa Soo (Eliza Hamilton) and Jasmine Cephas Jones (Maria Reynolds, Peggy Schuyler) twirled each other and danced; and Diggs and Anthony Ramos (John Laurens, Philip Hamilton) told jokes. Someone — it sounded like Kail — had to bellow, “Please keep quiet onstage.” Overall, no one appeared especially nervous. “We’ve worked all today and yesterday, so it’s not like there’s really been time to think about it,” Diggs says. “They made my entrance a couple of seconds earlier, and I had to move six inches over in one spot. Pretty minor stuff for me … But I’m so glad that there will be an audience, so we get to feel like it’s live. I think that will help with everything.”

At 7:30 p.m., audience members — mostly friends of the production who’d trudged through the snow — began settling into their seats. Stephen Colbert, here to introduce the performance on the air, rehearsed his bit, and then entertained the audience with show tunes and banter (a riff on how you always must say the word Broadway with great enthusiasm). Everyone cheered as Miranda popped out of the wings, and the cast did a dry run around 8:15. An hour or so later, the cue from Los Angeles came. The four-minute performance went off without a glitch and was met with a standing ovation. And some cheering before the end: At Miranda’s entrance, the cheers were so loud that they stepped on his initial “My name is Alexander Hamilton” lyric.

But of course there was an award still to be given out. A little before 10, audio of Kendrick Lamar piped into the theater — not the ideal way to enjoy his great performance — as anticipation built for the announcement of Best Musical Theater Album. When the name Hamilton was read out, Miranda & Co. rushed from backstage, faced the camera, accepted the trophy from Colbert, and rapped his acceptance speech as Ramos held up a Puerto Rican flag.

Afterwards, Miranda stood at center stage, shouting, “Take your pictures!” What the crowd wanted, though, was more Hamilton, and people screamed, “Song!” in lieu of “Speech!” (Sadly, he did not oblige.) Even though their win wasn’t exactly a surprise, the cast members were clearly emotional as they embraced. “The way a play works is that you do something that only a few people, in the grand scheme of things, can come see,” Diggs says. “And the rest of the world doesn’t care at all. That’s what happens with plays, for the most part. And Hamilton is a different thing. It’s in the Zeitgeist, and now a lot of people care. I think that’s so great for those of us who love to do theater.”