Anti-Roman sentiment may have run rampant through Asculum, a city on the Roman Empire’s Adriatic coast, but it was still no laughing matter. Politics in the first century B.C.E., when Asculum and other Italian tribes rebelled against the Empire in what would come to be known as the Social War, were no joke.

But that still didn’t stop comedians and actors from injecting politics into their performances, often at their own risk. In a story recounted by Diodorus Siculus in Library of History, a performer portrays an anti-Roman stance, only to be murdered by Roman soldiers for doing so. In the next act, a comedian announced to the crowd, “I’m not a Roman either. I travel throughout Italy searching for favors by making people laugh and giving pleasure. So spare the swallow, which the gods allow to nest safely in all your houses.” Fortunately, his request was heeded, and he survived the experience.

The Ancient Romans enjoyed many flavors of theatrical performance, from classic theatrical comedies to the more impromptu performances of actors who did short sketches and used physical humor. The earliest known performances came from a town in southern Italy called Atella in the 4th century B.C. It wasn’t until 346 B.C. that Roman historian Livy writes of performances in Rome proper, as part of a religious festival to request that the gods ward off the plague. But generally speaking, theater and comedy weren’t considered acts of worship.

Performances were staged in makeshift theaters open to the elements, unlike the amphitheaters of Greek performances. Pompey became the first to erect a permanent theater in Rome in 55 B.C., built of stone and seating thousands of spectators. As theater evolved, comedies began to be staged at public games. Most comedians were poorly paid, but exceptionally popular ones—men like Aesopus and Roscius, who acted in dramas and comedies—could earn sizeable fortunes, according to George Duckworth’s The Nature of Roman Comedy.

There are a few caveats when it comes to understanding the political comedy of ancient Rome. First, however much we might like to interpret Roman humor through the lens of modern taste and culture, a gulf of 2,000 years divides us. Even popular humor from a few decades ago fails to elicit a smirk today, so it’s unfair to expect comedy from two millennia ago to hold up. As classics professor Gregory Hays writes in the New York Review of Books, “In studying other cultures we are trapped, as the anthropologist Clifford Geertz once put it, between ‘the consoling piety that we are all like to one another and…the worrying suspicion that we are not.’”

Second is the unanswerable question of which Romans made and consumed comedy. “The surviving record unduly privileges men, citizen men and literate citizen men in Rome,” says C.W. Marshall, a professor of Greek at the University of British Columbia. “The record skews towards a small portion of society.”

Regardless of their social stature, “comedy” didn’t necessarily mean what we think of as comedy today—comedians were often performers who tackled non-tragic work. Comedic poets used puns and wordplay, as did mimes. These weren’t silent performers like Marcel Marceau, but rather the equivalent of sketch comedians—and their numbers even included women. Their performances were largely improvised and used facial expressions and costumes to imitate and mock everyone from pompous politicians to rustic tourists.

In the early 200s and late 100s B.C.E., comic dramatists Plautus and Terence wrote more than 25 plays combined—the earliest complete Latin texts. “Comedy jokes at us for wanting to hold onto ourselves, for thinking that our identity is stable,” writes University of Manchester classics professor Alison Sharrock in Reading Roman Comedy: Poetics and Playfulness in Plautus and Terence. In other words, comedy was funny in part because it upended Roman expectations—whether that meant disguising a prostitute as a lady or seeing a slave outsmart their master.

For hundreds of years following the deaths of the two fathers of theatrical comedy, their successors used humor to upend expectations, antagonize Roman society, and engage with the political discourse of the day. Take Seneca the Younger, a philosopher and advisor to the Emperor Nero. In 54 C.E., Seneca penned a short tract called The Apocolocyntosis, which mocked the recently murdered emperor Claudius.

In the play, Seneca “very skillfully and wickedly” mocked Claudius’ many physical and mental ailments, including a speech impediment and physical weakness, writes classicist H. Mac L. Currie. Seneca used Claudius’ fondness for dice games (the late emperor wrote a book on the topic and even had his carriage outfitted so he could play while on the move), as a nasty punishment for the late emperor: a dice cup without a bottom. Seneca could get away with such jabs because his sponsor was the emperor’s successor.

While Seneca used his pen to elicit laughter and derision—and did so with relative impunity—other comedians weren’t so lucky. Being a comedic performer instead of a writer came with a major disadvantage: It meant you couldn’t be a citizen. Performers were among the infamis, and couldn’t call themselves citizens of Rome or get any of the associated benefits, like the limited form of political representation others enjoyed. This meant that most comedians who acted were former slaves or people who didn’t have any citizenship to lose.

For the rare comedian who worked their way out of acting into writing, there was no promise of keeping that higher social status. In 46 B.C.E., Julius Caesar demanded that one of the great mime writers of the time, Decimus Laberius, perform in a sort of stand-up battle of mimes. Laberius would face off against a Syrian ex-slave called Pubilius. Laberius wasn’t overly eager to forfeit his rank, but how could he say no to Caesar? So Laberius appeared, dressed in the outfit of a Syrian slave to mock his competitor, and said “Citizens, we are losing our freedom,” as well as, “He who many fear must fear many.” While Laberius lost the competition, he was actually rewarded by Caesar so that he could buy back his citizenship.

“It’s an interesting example of a comedian spontaneously participating in critical political discourse against the most powerful person in the world,” Marshall says. “It may not have happened exactly this way, but the values that the story is exalting are what the Romans thought the purpose of comedy should be”—speaking truth to power.

Yet laughter wasn’t solely a tool of the oppressed. “For every laugh in the face of autocracy, there was another laugh by the powerful at the expense of the weak,” writes classical historian Mary Beard in Laughter in Ancient Rome: On Joking, Tickling and Cracking Up. Romans used jokes and laughter to mock the physically deformed and the effeminate, among others. In a number of plays the recurring character of the “parasite” is given food by a patron simply for laughing at his jokes and sometimes telling them.

In modern liberal democracies, comedians are free to express themselves politically. But in ancient Rome, the risks of “punching up” for comedy’s sake mirror the stories of comedians in today’s autocracies. Take Egyptian comedian Bassem Youssef. The former surgeon hosted a show that targeted Egyptian President Mohamed Morsi and religious leaders for criticism, citing the president’s failure to live up to campaign promises and the Muslim Brotherhood’s abuse of power. When the al-Sisi government (led by a president who came to power through a coup) began interrupting or postponing the broadcast of Youssef’s show and then a verdict came through saying he owed millions to his old network, Youssef fled.

Even so, sometimes laughter is better than nothing. When life dealt you autocrats, sometimes you had to turn them into a joke. “One response by the disaffected was violence, conspiracy, or rebellion,” Beard writes about ancient Rome. “Another was to refuse to take it seriously.”