François-Marie d’Arouet was the kind of precocious teen who always got invited to the best parties. Earning a reputation for his wit and catchy verses among the elites of 18th-century Paris, the young writer got himself exiled to the countryside in May 1716 for writing criticism of the ruling family. But Arouet—who would soon adopt the pen name “Voltaire”—was only getting started in his takedowns of those in power. In the coming years, those actions would have far more drastic repercussions: imprisonment for him, and a revolution for his country. And it all started with a story of incest.

In 1715, the young Arouet began a daunting new project: adapting the story of Oedipus for a contemporary French audience. The ancient Greek tale chronicles the downfall of Oedipus, who fulfilled a prophecy that he would kill his father, the king of Thebes, and marry his mother. Greek playwright Sophocles wrote the earliest version of the play in his tragedy, Oedipus Rex. As recently as 1659, the famed French dramatist Pierre Corneille had adapted the play, but Arouet thought the story deserved an update, and he happened to be living at the perfect time to give it one.

On September 1, 1715, Louis XIV (also known as the “Sun King”) died without leaving a clear successor. One of the most powerful rulers in the history of France, raising its fortunes and expanding colonial holdings, Louis also dragged the country into three major wars. He centralized power in France and elevated the Catholic Church by ruthlessly persecuting French Protestants. The king’s only son predeceased him, as did his grandson. His great-grandson, at age 5, needed a regent to oversee the ruling of the state. That duty fell to Philippe Duc d’Orléans, who used his position to essentially rule the country as Regent until his own death.

Philippe change the geopolitical trajectory of France, forming alliances with Austria, the Netherlands, and Great Britain. He also upended the old social order, opposing censorship and allowing once-banned books to be reprinted. The atmosphere “changed radically as the country came under the direction of a man who lived in the Palais-Royal, at the heart of Paris, and was widely known to indulge mightily in the pleasures of the table, the bottle, and the flesh—including, it was no less commonly believed, the flesh of his daughter, the duchesse de Berry,” writes Roger Pearson in Voltaire Almighty: A Life in Pursuit of Freedom.

For Arouet, the loosening of social restrictions created an almost limitless sense of possibilities, and harnessing theater was perhaps the most effective way to spread the message of freedom and tolerance to the public.

“Voltaire estimated that only five percent of the population in Europe could read in his Letters on England in 1733,” says Gail Noyer, the editor and translator of Voltaire’s Revolution: Writings From His Campaign to Free Laws From Religion. “So [public performances of] plays had far more influence than books did, until much later in the century.”

As for where his work would be performed, only one choice presented itself, even though Paris hosted multiple theaters. “The Comédie Française had a virtual monopoly as the only theatre authorized and supervised by the court for the staging of tragedies and serious dramas,” writes Ian Davidson in Voltaire: A Life. “Almost anybody who wanted to be a writer wanted to write for the Comédie Française.”

Arouet worked feverishly on his play, Oedipe, only for it to be rejected by the Comédie Française. Still, the theater didn’t give him an absolute dismissal, instead suggesting revisions, which he continued hacking away at for several years. Finally, on January 19, 1717, the theatre agreed to put on a revised form of the play.

But the timing for Arouet’s success couldn’t have been worse. While he’d been at work on his play, Arouet continued to write popular verses that were shared among his friends—including a piece that referenced the rumors of the Regent’s incestuous conduct with his daughter:

“It is not the son, it is the father;

It is the daughter, and not the mother;

So far, so good.

They have already made Eteocles;

If suddenly he loses his two eyes;

That would be a true story for Sophocles.”

The verse clearly pointed to the Regent, Philippe, and his relationship with his daughter, and even for the permissive ruler, it was a bridge too far. On May 16, 1717, Arouet was arrested and taken to the formidable Bastille. He tried to plead innocence in his case, claiming he wasn’t the one who’d written the verses, but he had already admitted authorship to several friends—friends who turned out to be spies. “Conditions in the Bastille were harsh and oppressive, with its ten-foot walls, its ‘triple locks, and grills and bolts and bars’, and with poor food and no sunlight,” Davidson writes. Even worse, Arouet had no idea when he might be set free, if ever. His case never went through any type of judicial process; the length of his detention depended solely on the whim of the Regent.

After 11 months, the Regency decided to show mercy to Arouet, releasing him on Holy Thursday, April 14, 1718. Arouet was placed on the 18th-century equivalent of house arrest for several more months, but was finally allowed free entry in and out of Paris, and on November 18, 1718, the young man who had started to address himself as “Voltaire” had the first major success of his life: the staging of Oedipe at the Comédie Française.

The play was immensely popular, going on to run for a nearly unprecedented 32 performances, Davidson writes. Perhaps some of that popularity stemmed from the Regent’s titillating scandals. But Voltaire didn’t just attack hereditary monarchy; he also leveled charges against the corrupt power of the Church. In one of the playwright’s most famous lines, Queen Jocasta says, “Our priests are not what the foolish people imagine; their wisdom is based solely on our credulity.” Considering how powerful the Catholic Church remained, it was a dangerous dig to make—but one audiences thrilled to hear.

“Generally, the moral content of earlier plays stressed love of God and king, patriotic duty and the like,” writes literary historian Marcus Allen. “In the hands of Voltaire, however, the play itself became the primary vehicle for launching attacks upon the evils of the ancien régime.”

The popularity of the play catapulted Voltaire to true fame, but it also taught him of the dangers that accompanied outspokenness. As he continued writing plays, poems, letters and stories, Voltaire faced an increasing number of critics as well as fans, and would be exiled from France multiple times over the course of his life for offending the Catholic Church and the monarchy. But Voltaire’s stays in England, Holland, Belgium and Prussia exposed him to some of the era’s greatest Enlightenment figures; he was the first to bring the writings of Isaac Newton and philosopher John Locke to France. With his condemnation of torture, war, religious persecution and absolute monarchy, Voltaire paved the way for the ideas that would fuel the French Revolution in 1789, and inspired great American intellects like Benjamin Franklin and Thomas Jefferson. Yet according to Noyer, much of that legacy is forgotten today.

“The only thing people seem to know anymore is Candide,” Noyer says, referencing a satirical novel about the dangers of optimism. “I think it’s only chosen as a safe subject, because it certainly wasn’t a big deal in his lifetime.” For Noyer, the real masterpiece is how much Voltaire managed to achieve with his words: helping to inspire the French Revolution and teaching people to think more critically about religious intolerance and injustice.