Though the epic presidential battle between Donald Trump and Hillary Clinton may feel unique, these same personalities have clashed before.

More than 500 years ago, the prophet Savonarola enthralled Renaissance Europe while Machiavelli, chief policy wonk of the age, scorned the showman’s demagoguery. Trump and Clinton are replaying those parts—and will leave similar marks on history.

Trump is a prophet. That is the clearest way to understand the man’s methods, his popular appeal and his psychology. His improbable presidential run has followed closely the script set forth by the chief doomsayer of the Renaissance, Girolamo Savonarola.

A friar and political outsider, Savonarola exploded from obscurity in the 1490s to captivate the city of Florence, sweep away a Medici establishment that had ruled for half a century, and incite a mass campaign against liberal values that ended with his historic Bonfire of the Vanities.

How did Savonarola do it? First, by shouting an apocalyptic message that stoked people’s deep anxieties. Ottoman Muslims loomed to the east. The French invaded and carried away the city’s wealth in a lopsided peace deal. In a vague way, Savonarola had predicted both and concluded, to quote Trump: “We don’t win anymore!” The moment called for strong leadership—both moral and political—but as Savonarola said: “O Florence, Florence, your cup is full of holes.”

Second, he owned the news cycle. Print media was just emerging, and Savonarola harnessed its potential better than any. He delivered fiery sermons to crowds of thousands, and then print houses helped him reach thousands more with the sure-to-sell printed version. Popes and princes repeatedly declared him false. Every time, Savonarola answered by flooding the streets with cheap pamphlets—15th-century tweets—that twisted those denunciations into proof of elite corruption.

Third, he believed. Savonarola’s most fervent follower was himself. He believed God had appointed him the task of renewing the city, and so whatever words he spoke, they were true. That ecstatic confidence was his greatest strength. It drew to his every sermon a horde of sensation-seekers, plus citizens who had lost faith and longed to have it restored by the man’s reality-bending powers.

But the same confidence also blinded him to political realities. The Paul Ryans of the day who had supported Savonarola’s agenda—evicting the Medici oligarchs, broadening citizen representation in the city’s councils—shook their heads in frustration at his incapacity to rein in the messianic ego when prudence demanded. (Bad-mouthing the Pope has never been a vote-winner.)

If The Donald is a modern Savonarola, then Hillary is America’s Machiavelli.

Niccolò Machiavelli was Florence’s anti-prophet: a career politico who was too steeped in the nuts and bolts of the republic’s problems to stomach Savonarola’s loose and sudden populism. “In my opinion, he shifts with the times, and colors his lies to suit them.”

Savonarola shouted airy phrases from a pulpit; Machiavelli wrote dry policy papers from the chancery. For years he labored tirelessly as a chief secretary, then as a diplomat. Nine out of every 10 of his thoughts were political, and his close associates praised his astounding intellect and work ethic. Despite all his passion for public service, to quote Clinton: “The service part always came easier than the public part.” Machiavelli himself said it better: “I burn—but the burning makes no mark outside.”

In opposite ways, the prophet and the policy wonk together reshaped the center of Renaissance Europe—and are reshaping America now.

Savonarola’s legacy was to give voice to the political and cultural tensions of his day—tensions that the Medici had muffled. The prophet himself was silenced (burned at the stake) by his political opponents the moment his popularity wavered. He had made too many enemies: on the “left,” those who rejected his moral austerity; on the “right,” those who feared a trade war with the pope; and up high, those who feared the loss of their privileges. But his death did nothing to reunite the city. His strident indignation could not be unshouted.

For the rest of his life, Machiavelli tried to channel those raw energies into sensible reforms. He may have detested the mad monk’s methods, but he also believed that occasional citizen-driven crises were the mark of a healthy, vital republic.

It was a tough road. Over decades of success and failure in and out of office, the ambitious secretary came to two famously harsh beliefs: that the ends justify the means and that the first rule of politics must be self-reliance—since no one can be trusted fully.

History still remembers Machiavelli best for this cynicism. It forgets that he was driven to continue his service by a deep faith in the people’s power to shape their collective future. Clinton, no stranger to high unfavorables, claims the same drive.

This election cycle has been full of surprises, but how history will remember its chief protagonists is already becoming clear. Trump’s legacy will be how he whipped up the tensions of his time. Clinton’s will be how she spent her life trying to make America stronger.

Sign up for Inside TIME. Be the first to see the new cover of TIME and get our most compelling stories delivered straight to your inbox. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Contact us at letters@time.com.