Peter Thiel, a PayPal founder and tech luminary, upset a lot of people by endorsing Donald Trump. (Wasn't Silicon Valley supposed to be liberal?) He has also upset people by crushing Gawker Media, attacking the college system, criticizing multiculturalism, and more.

Thiel usually explains his actions in libertarian or pragmatic terms. He does stuff to promote individual freedom. He does stuff because it's logical.

If you look at his wonkier writings, however, it's clear Thiel also recognizes a larger historical mission. In short, he's trying to save the world from apocalypse.

"We are in a deadly race between politics and technology," Thiel wrote in a 2009 essay on Cato Unbound. "The future will be much better or much worse, but the question of the future remains very open indeed. ... The fate of our world may depend on the effort of a single person who builds or propagates the machinery of freedom that makes the world safe for capitalism."

Thiel's philosophy, though complex, is coherent and provocative. It's also arguably liberal — at least in the classical sense of valuing individual freedom.

In this article, we'll try to break it down and show how it relates to various actions. Thiel declined to be interviewed, so we'll focus on his past comments.

"The limitless violence of runaway mimesis or the peace of the kingdom of God"

To understand Thiel's outlook, you have to look at mimetic theory, an idea developed by René Girard, whom Thiel studied with at Stanford and in whose name he sponsors an institute.

"I've noticed that it takes a long time to really sink in," Thiel said in 2014 about Girard's theories. "You can understand what his words mean as philosophical concepts without understanding how those concepts play out in life."

Like Girard, Thiel believes that ...

... mankind's extraordinary capacity for mimesis, aka imitation, leads to envy.

Human see, human want.

In ancient cultures, this often resulted in chaos.

"The fundamental problem in these cultures was that there were all sorts of conflicts everywhere," Thiel said in a 2012 class, according to notes by his former student Blake Masters, which we'll treat as verbatim.

... society controls tensions through scapegoating.

"Where warring civilizations didn't just collapse entirely, the most common resolution involved polarizing and channeling all the hostility into one particular person," Thiel told his class.

Early examples of scapegoats might include Oedipus and Julius Caesar. Recent examples might include Bill Gates, Kanye West, and Donald Trump.

By literally or figuratively sacrificing these figures, people are able to find a cathartic release for anger, envy, and other destructive urges.

... modern thought aims to uncover the truth about society.

The fact that society is built on violence and justified by lies. The fact that we have these violent urges in us.

Girard and Thiel hold the New Testament as a seminal text, with its defense of innocent victims through history and its focus on Christ, the most innocent scapegoat of all.

"For Girard, the knowledge of the founding murder is driven by the historical working of the Judeo-Western revelation," Thiel wrote in 2004. "The revelation may be slow (because it contains a message that humans do not wish to hear), but it is not reversible."

Thiel also describes modern thought in terms that might be called liberal or libertarian. As he wrote in 1996, "The breakthrough involved a single revolutionary idea: that individuals exist and have rights, and that these rights are independent of the cultures these individuals happen to inhabit."

The spread of modern thought might lead to paradise, but ...

... modern thought is dangerous.

By exposing the lies that hold up society — e.g., that we are good and others are evil — modern thought makes it harder to justify ongoing exploitation.

What's more, modernity has introduced ever larger societies, opening the possibility for ever larger mimetic rivalries. Today, for instance, people around the world might be aware of and jealous of how people in the West live.

"For Girard, this combination of mimesis and the unraveling of archaic culture implies that the modern world contains a powerfully apocalyptic dimension," Thiel wrote in 2004.

Where Thiel goes beyond Girard is in ideas about influencing the future.

Thiel laid out his own worldview at a 2004 philosophical conference, which he sponsored, on "Politics and Apocalypse." As noted by the scholar Geoff Shullenberger, "Thiel's contribution to the conference, seeks common ground between Girard's mimetic theory of human social life … and the work of two right-wing, anti-democratic political philosophers who were in vogue in the years following 9/11: Leo Strauss … and Carl Schmitt."

In a world of nuclear weapons, facing the scale of terrorism seen on 9/11 or worse, true liberal thinkers must act forcefully to spread their values and stave off existential risks, Thiel argued.

On the philosophical front, that meant reengaging with important questions about human nature — e.g., what are good and evil and why is society the way it is.

"Today, mere self-preservation forces all of us to look at the world anew, to think strange new thoughts, and thereby to awaken from that very long and profitable period of intellectual slumber and amnesia that is so misleadingly called the Enlightenment," Thiel wrote.

On the political front, that meant taking occasionally secret or undemocratic actions.

"Instead of the United Nations, filled with interminable and inconclusive parliamentary debates that resemble Shakespearean tales told by idiots, we should consider Echelon, the secret coordination of the world's intelligence services, as the decisive path to a truly global pax America," Thiel wrote.

"The postmodern world," Thiel wrote, "could differ from the modern world in a way that is much worse or much better — the limitless violence of runaway mimesis or the peace of the kingdom of God."

How to save the world

Thiel's apocalyptic mission — which might be described as spreading individual freedom while preventing cataclysmic mimetic violence — appears to be a factor in many of his actions.

His attack on multiculturalism — such as in his 1995 book, "The Diversity Myth: Multiculturalism and Political Intolerance on Campus" — was a warning against a new form of scapegoating.

"Rather than breaking the cycle of human history, multiculturalism merely represents another link in the long chain of victimization and revenge," Thiel wrote.

What's more, Thiel argued, debates about female culture, black culture, and a thousand other cultures were distracting from more important questions about human culture.

Founding PayPal, which launched in 1999, may have been a way to spread individual freedom and keep dangerous political forces in check. Thiel said in an early speech (recounted by Eric Jackson): "PayPal will give citizens worldwide more direct control over their currencies than they ever had before. It will be nearly impossible for corrupt governments to steal wealth from their people through their old means, because if they try, the people will switch to dollars or pounds or yen, in effect dumping the worthless local currency for something more secure."

Thiel, left, and partner Elon Musk in the early days of PayPal. AP

PayPal, notably, didn't work quite as intended. September 11 "proved fatal to PayPal's libertarian ambition — electronic currency systems suddenly seemed like ideal ways for terrorists to hide money," George Packer wrote. (The company sold to eBay in 2002.)

Founding Palantir, a big data analysis company specializing in security, in 2004, might have been Thiel's way of supporting forceful but necessary political actions. Remember Thiel's line about the global spy network Echelon being "the decisive path to a truly global pax America"? It is clearly echoed in Palantir Defense's mission to fuse "data and analysis across geographically dispersed users, providing commanders with the latest intelligence no matter where they are."

Investing in Facebook, back in 2004, could be read as a way to spread individual freedom. As Thiel wrote years later, "companies like Facebook create the space for new modes of dissent and new ways to form communities not bounded by historical nation-states." Additionally, perhaps Facebook was "a mechanism for the containment and channeling of mimetic violence in the face of an ineffectual state," Shullenberger wrote — let people fight on social media, and they won't fight in real life.

Thiel did at least recognize the potential of Facebook through mimetic theory.

"Facebook first spread by word of mouth, and it's about word of mouth, so it's doubly mimetic," he told The New York Times. "Social media proved to be more important than it looked, because it's about our natures."

Thiel's other activities in the past decade might be summed up as trying to spread liberal innovation and disrupt stagnation.

Thiel promoted innovations like artificial intelligence, life extension, and seasteading — the creation of new societies in international waters. In his 2014 book, "Zero to One," Thiel championed the idea of true innovation (going from 0 to 1) as opposed to copying (going from 1 to n). No wonder he was popular in Silicon Valley.

Thiel tried to disrupt what he saw as an overpriced and not-truly-intellectual university system, which he challenged with $100,000 Thiel Fellowships that required recipients to drop out of college, and what he saw as an overpriced and incompetent government, which he challenged by supporting libertarian and conservative groups and candidates.

Which just about brings us to the present.

Peter Thiel walks out of Trump Tower. REUTERS/Eduardo Munoz

In May 2016, Thiel admitted to funding Hulk Hogan's privacy lawsuit against Gawker Media, which eventually bankrupted the publication. This action upset many liberals because it appeared to be an attack on the freedom of the press — after all, Gawker had antagonized Thiel in 2007 by outing him as gay, and now the powerful man appeared to be getting revenge.

Thiel publicly defended himself by saying he was defending broader issues of online privacy.

"The press is too important to let its role be undermined by those who would search for clicks at the cost of the profession's reputation," he wrote in The Times. Thiel pointed to his support of the Committee to Protect Journalists as evidence of good faith.

Perhaps privately, Thiel worried that Gawker was stirring up tensions and slowing global progress with its gleeful embrace of scapegoating. Shullenberger observed the same in a recent essay.

"It seems reasonable to conclude that Thiel's animus against Gawker, which he has repeatedly accused of 'bullying' him and other Silicon Valley power players, is closely connected to his core concern with scapegoating, derived from his longstanding engagement with Girard's ideas," Shullenberger wrote. Perhaps Thiel also feared that Gawker was undermining the kind of journalism that spread truth.

As for his thoughts on sexual privacy, Thiel's stance appears to follow his criticism of multiculturalism. He doesn't want to identify as a gay man; he'd rather identify as a human.

In June 2016, Thiel took his most provocative action yet. Appearing at the Republican National Convention, he endorsed Donald Trump for president.

"I'm not a politician. But neither is Donald Trump," Thiel told the audience. "He is a builder, and it's time to rebuild America."

Thiel stole the show at the Republican National Convention. Note the banner: "Make America One Again." REUTERS/Rick Wilking

Thiel's support for Trump surprised many people who may have assumed that any smart person out of Silicon Valley must be a liberal, but it made sense in a lot of ways.

On the surface, Thiel might have liked a candidate who was a founder, who mocked political correctness, who pledged to reduce the size of government, and who, in general, seemed likely to disrupt politics as usual.

Although Thiel was once skeptical about politics — he wrote in 2004 that "no new Alexander is in sight to cut the Gordian knot of our age" — perhaps he saw Trump as the rare leader who might accomplish something.

On a deeper level, perhaps Trump fit into Thiel's grand historical plans. Here was a man who would disrupt the runaway mimesis caused by globalization, which encouraged people around the world to compare their lives to everyone else's. Here was a man who was already channeling mimetic tensions through scapegoating — conservatives were venting about Mexicans, the Chinese, and Hillary Clinton, while liberals were venting about Trump himself. By serving these functions, the provocative candidate might paradoxically defuse or distract from global tensions.

Perhaps, as suggested by Shullenberger and others, Trump is destined to become a scapegoat for the ages, a kinglike figure who is in one way or another sacrificed to create a new world order.

"Trump even viscerally looks the part of the old scapegoat kings who would be ceremonially paraded before being sacrificed," commentator David Gornoski wrote.

Has Thiel really done these things to ensure the spread of individual freedom, in pursuit of global peace? Whatever exactly he is doing, don't expect him to talk openly about it.

Thiel subscribes to "the Straussian idea that it's important for the intellectual elite and the ruling class to have secrets," Shullenberger wrote in an email. As scary as that sounds, one might take faith in the idea that Thiel believes in a final reckoning.

"The Christian statesman or stateswoman must diverge from the teachings of Strauss in one decisive respect," Thiel wrote in 2004. "One must never forget that one day all will be revealed, that all injustices will be exposed, and that those who perpetrated them will be held to account."