In this image made from a video provided by Hamilton LLC, “Hamilton” actor Brandon Victor Dixon, who plays Aaron Burr, the nation’s third vice president, speaks from the stage after the curtain call in New York. Vice President-elect Mike Pence was in the audience. (Associated Press)

Kenneth Cohen is an associate professor of history at St. Mary’s College of Maryland. He is currently serving as Fulbright professor of American studies at Université Félix Houphouët-Boigny in Abidjan, Ivory Coast.

“The Theater must always be a safe and special place,” President-elect Donald Trump tweeted after the cast of “Hamilton” confronted Vice-President-elect Mike Pence following a performance last week. Opinions may differ about the propriety of those comments, but Trump’s subsequent demand for an apology ignored the historical relationship between theater and politics — and the robust U.S. tradition of blending the two.

Theaters have traditionally been places where Americans debate politics. In Alexander Hamilton’s time, they were leading venues for both Federalists and their Democratic-Republican rivals to rally supporters. In fact, in 1803, newspaper editor Mathew Carey commented on the partisan tensions at playhouses, writing that “the play-house, like the grave, brings friends and enemies together, and both are, as in the grave, promiscuously placed by the side of one another: yet, unlike the tomb in one respect, they assembled in the theatre not to lose the passions of nature, not to drop the asperities of the heart or forget they ever had a foe, nor yet ‘to cease from troubling and be at peace’; but every man comes armed, either with the terrors of prejudice or the less hostile (though frequently not less dangerous) weapons of prepossession.”

From the 1790s through the 1840s, partisan disruptions were commonplace in American theaters. Playwrights wrote plays pandering to one party or another. Attendees interrupted performances to demand changes in lines and music that would reflect their political interests. Disturbances sometimes erupted into violence among spectators or targeted a performer who refused to comply with demands. When this happened, actors and managers responded by directly addressing the audience’s grievances and explaining how they could be satisfied. Most of the time, these speeches worked because they made the audience feel heard.

But in May 1849, at the new Astor Place Opera House in New York, things did not go according to the usual script. The Opera House was not a typical theater. It was more opulent, and the unusually large gap between ticket prices in the cheapest and other sections must have seemed intended to demonstrate the superiority of elites. Under such conditions, were actors, and the Opera House’s investors, beholden to popular demand? The investors did not think so, and they pressed on with performances by an actor that many working-class theater-goers thought had insulted them. The result was a riot that spilled outside, culminating with the New York militia firing into the crowd and killing about 20 people.

After the Astor Place riot, the nature of the mainstream theater changed. Playhouses employed workers to restrict boisterous audience behavior. Prices rose in the new Broadway theaters; a balcony seat cost three times as much as a bleacher seat at Yankee Stadium in the early 1950s. Elsewhere in the country, playhouses increasingly became nonprofit entities with philanthropic support, insulating them from having to cater to a broad clientele. Theater-going became tamer.

In general, Broadway theaters remain staid today. Partly, this is because their audiences are overwhelmingly white and affluent, and thus they do not share the cross-class tensions of earlier eras. But as casts have diversified over the past 30 years, a number of more politicized plays have been successfully staged, revealing a market for works with clearly liberal viewpoints. “Rent” and “Hamilton” are perhaps the two most prominent examples. So, when Pence went into the Richard Rodgers Theatre, it is possible that, like the investors in the Astor Place Opera House, he thought his tickets promised a tame experience. But going to see “Hamilton” is not the same as going to The Met or attending the Kennedy Center Honors. Class unity and the privilege of holding office do not override politics at a performance with an explicitly liberal message about immigrants and minorities, performed in part by actors harboring concerns about Indiana Gov. Pence’s policies toward gay people.

Given the content of “Hamilton” and its audience, it is hardly surprising that the gradual re-politicization of mainstream theater took another step toward its old form when Pence showed up. Afterward, as if following protocol from a bygone age, the actors sought to calm the audience, saying, “There is nothing to boo here,” before stating their anxieties and their hope that Pence will “work on behalf of all of us” — a concluding request that turned any remaining tension into partisan but not threatening cheers. It is unlikely that theater will trigger something like Astor Place again. But last week, both spectators and actors availed themselves of theater’s long history of political activism, a history rooted in the founding period represented on that stage every night.