John Nash, a Nobel laureate and mathematical genius whose struggle with mental illness was documented in the Oscar-winning film A Beautiful Mind, was killed in a car accident on Saturday. He was 86. The accident, which occurred when the taxi Nash was traveling in collided with another car on the New Jersey Turnpike, also claimed the life of his 82-year-old wife, Alicia. Neither of the two drivers involved in the accident sustained life-threatening injuries.

Born in West Virginia in 1928, Nash displayed an acuity for mathematics early in life, independently proving Fermat’s little theorem before graduating from high school. By the time he turned 30 in 1958, he was a bona fide academic celebrity. At Princeton, Nash published a 27-page thesis that upended the field of game theory and led to applications in economics, international politics, and evolutionary biology. His signature solution—known as a “Nash Equilibrium”—found that competition among two opponents is not necessarily governed by zero-sum logic. Two opponents can, for instance, each achieve their maximum objectives through cooperating with the other, or gain nothing at all by refusing to cooperate. This intuitive, deceptively simple understanding is now regarded as one of the most important social science ideas in the 20th century, and a testament to his almost singular intellectual gifts.

But in the late 1950s, Nash began a slide into mental illness—later diagnosed as schizophrenia—that would cost him his marriage, derail his career, and plague him with powerful delusions. Nash believed at various times that he was the biblical figure Job, a Japanese shogun, and a “messianic figure of great but secret importance.” He obsessed with numbers and believed the New York Times published coded messages from extraterrestrials that only he could read.

Mental institutions and electroshock therapy failed to cure him, and for much of the next three decades, Nash wandered freely on the Princeton campus, scribbling idly on empty blackboards and staring blankly ahead in the library. Atlantic contributor Robert Wright, an undergraduate at Princeton in the late 1970s, remembers Nash as “some math genius that went crazy” who wore colorful sneakers and quietly watched people. His schizophrenia removed him completely from his work. By the time Nash was awarded the Nobel prize in Economics in 1994 (along with John Harsanyi and Reinhard Selten), he hadn’t published a paper in 36 years.

But like a child cured of a nightmare by the switch of a light, Nash recovered from his illness seemingly by choosing not to be sick anymore. “I emerged from irrational thinking, ultimately, without medicine other than the natural hormonal changes of aging,” he wrote in 1996. Five years later, the release of the film A Beautiful Mind, based on Sylvia Nasar’s 1998 book of the same name, amplified Nash’s extraordinary life story to an international audience. He continued to work, travel, and speak at conferences for the rest of his life.

It’s tempting to wonder what Nash might have accomplished had mental illness not robbed him of so many productive years. But the “beautiful mind” that gave him such prodigious mathematical talent was indivisible from the one which spawned powerful delusions. In her study of creativity published in the July/August 2014 edition of the Atlantic, Nancy Andreasen related a memorable anecdote from Nasar’s book. Upon visiting Nash at a mental institution, a colleague asked how a man so devoted to reason and logical truth could believe that extraterrestrials were sending him messages.

“Because the ideas I had about supernatural beings came to me the same way that my mathematical ideas did,” replied Nash. “So I took them seriously.”