On March 18, 2015, The New York Times announced that Razib Khan would become a contributing opinion writer. A day later, The Times terminated the contract.

At the time, Khan was a Ph.D. student in genetics at the University of California, Davis and a popular science blogger. He had written about science for The Times, Slate, The Guardian, and other mainstream publications. For years, Discover had hosted his genetics blog. The famed Harvard psychologist Steven Pinker had even called him “an insightful commentator on all things genetic.”

“I have been made aware that Breitbart News has used photos of me … in an article about [the] ‘alt-right,'” Razib Khan wrote on Twitter last year. “To be clear, I’m not “alt-right.'”

Khan had also spent more than a decade hanging around the white nationalist fringe. When The Times hired him, he was blogging at The Unz Review, an “alternative media selection” that would soon emerge as a platform for the alt-right, the loose movement of white nationalists and right-wing extremists that has come to new prominence with the presidency of Donald J. Trump. Khan’s fellow science blogger at The Unz Review was Steve Sailer, a right-wing journalist and the author of a biography of Barack Obama titled “America’s Half-Blood Prince.”

Fragments from that part of Khan’s life started circulating online almost immediately after the news of his appointment at The Times was announced. Those fragments included a letter he had written in 2000 to VDare, a white-nationalist website, suggesting among other things that black people are innately less intelligent than white people. Later that week, a spokeswoman for The Times issued a statement saying “after reviewing the full body of Razib Khan’s work, we are no longer comfortable using him as a regular, periodic contributor.”

Almost two years later, the alt-right and its obsessions with race are ascendant — and scientific arguments are central to the movement’s ideological claims. Not surprisingly, Khan’s story has stuck around. Two prominent writers for Breitbart, the alt-right news outlet whose former executive chairman, Stephen Bannon, now serves as chief strategist in Trump’s White House, mentioned Khan sympathetically in a widely-read manifesto published last spring. Those writers — Milo Yiannopoulos, who resigned from Breitbart last week, and Allum Bokhari — lamented that Khan had “lost an opportunity at The New York Times over his views on human biodiversity.”

Yiannopoulos, who has been banned from Twitter for inciting harassment, and who was shouted down by protesting students before a scheduled appearance at UC Davis last month, has since used Khan’s story in his public speeches.

For all of this, dismissing Khan as a crank would be a mistake. While his associations are extremist, his science is not, and very little of what he writes about human genetics falls outside the pale of ordinary scientific discourse. Khan is also not alone in bridging the worlds of scientific racism and mainstream science and science writing. The Times dropped Khan in 2015, less than a year after one of its own science journalists, Nicholas Wade, published a book that made more sustained, incendiary arguments about race, with far more blowback from scientists.

Still, Khan’s career exemplifies the sometimes-murky line between mainstream science and scientific racism, and it illustrates how difficult it can be to define the boundaries between acceptable and unacceptable speech about race — and to understand what, if anything, science has to do with it.

This issue isn’t going away. Researchers are getting better at quantifying minute differences among individuals and among groups, and their findings will almost certainly be used, as they have long been, by people willing to ascribe a sort of racial destiny to all manner of human virtues and faults. Most scientists will object to this application of their work, but the illiberal challenges to scientific scholarship, perhaps now more than ever, seem destined to come not just from creationists and neo-skinheads, but from self-styled hyper-rationalists, too — from people who adhere to what they consider a “science-first” worldview, who often ignore history and social context, and who are predisposed to drawing troubling, and sometimes patently racist conclusions based on otherwise dispassionate science.

In other words, they’ll come from people who sound a lot like Razib Khan.

Seventeen years ago, when scientists announced the first full sequencing of the human genome, it was heralded as a breakthrough that would quash scientific racism. At a White House press conference, Craig Venter, the head of Celera Genomics, announced that one goal of the work was “to help illustrate that the concept of race has no genetic or scientific basis.” In the five genomes they sequenced, Venter said, “there is no way to tell one ethnicity from the other.”

Scientific racists — people who argue that their ideas about racial hierarchies are rooted in biological facts about human difference — have been peddling their ideas for more than a century. But Venter and others were betting that the sequencing of the human genome would show that race is mostly a social construct.

This idea is easy to caricature. Everyone recognizes that human traits, like height and skin color, are variable. But the particular way we choose to sort people into buckets based on that variation is far more arbitrary — and largely unscientific. “We just have to understand that these categories are ones that human beings make,” said Ann Morning, a sociologist at New York University who studies racial classification. “They are not rules which are handed down to us by Mother Nature. In that sense, racial categories are like astrological categories: These are both systems for classifying people to help make sense of why they act the way they do.”

In fact, from a genes-eye point of view, racial groupings don’t make much sense at all. People from different regions in Africa can as genetically distant from each other than as a Greek is from an ethnic Korean. People who are considered black in the United States may get the majority of their genetic material from Europe.

Researchers are getting better at quantifying minute differences among individuals and among groups, and their findings will almost certainly be used by people willing to ascribe a sort of racial destiny to all manner of human virtues and faults. Visual: Undark/iStock.com

Personal genetics provides a good way to map human similarities. But it also provides new opportunities to quantify human difference. Today, white nationalists buy 23andMe tests to prove their whiteness. Alt-right thinkers argue that genetics shows that racial differences do have a biological basis. Scientific racists look for evidence that there are deep, innate differences between racial groups, especially with respect to intelligence.

“Behind every racist joke is a scientific fact,” Milo Yiannopoulos told Bloomberg last year. Richard Spencer, the young neo-Nazi who coined the term “alt-right” — and who became famous recently for receiving an enthusiastic punch to the head in video that quickly went viral — publishes a journal that often includes articles about human evolution and genetics. Steve Sailer has also helped rebrand scientific racism as “human biodiversity.”

“The entire Alt Right is united in contempt for the idea that race is only a ‘social construct,’” the Yale-educated white nationalist Jared Taylor wrote last fall. “Race is a biological fact.”

Few writers have moved more comfortably between the worlds of mainstream science writing and the alt-right than Razib Khan. A fast-talking autodidact with right-wing political views, Khan writes about everything from foreign policy to CRISPR. A recurring theme of his work is that racial differences are real, and that they have a biological underpinning — that they’re both social constructs and biological truths.

Khan was raised by Bangladeshi immigrants in eastern Oregon, “an atheist brown kid in a highly religious, conservative, Republican area,” as he puts it now. In the late 1990s, he started exploring the nascent right-wing blogosphere. Around 2000, he joined a private email discussion group about human biodiversity organized by Sailer. (More mainstream academics, including Steven Pinker, were also in the group).

Not long after that, Khan helped a geneticist friend start a blog about science. They called it Gene Expression — GNXP, for short. Its writers discussed technical topics, as well as issues with a more political edge, like gender and racial differences.

A few years later, Khan went on the payroll of Ron Unz, a libertarian who ran for governor of California in 1994. Unz, who made a fortune in software development, offered Khan something that Unz describes as “a sort of fellowship or junior fellowship” to further his scientific career. Both Khan and Unz are vague about the reasons for the fellowship, but the gift was contingent on Khan leaving his job in software to focus on a scientific career. It was a big part of why he got on a graduate school track and ended up at UC Davis.

Unz’s grants reflect the diversity of his interests, which include Israel, non-interventionist foreign policy, and human evolution. In 2009, for example, according to Unz Foundation tax documents, Unz gave $24,000 to Sailer; $500,000 to the University of Utah evolutionary anthropologist Gregory Cochran, known for his controversial research on recent human evolution and Ashkenazi Jewish intelligence; and $108,000 to Khan, to be paid out over three years.

Unz was not Khan’s only link to the emerging alt-right fringe. In 2009, Khan spent a year blogging for Taki’s Magazine, a white-supremacist site, at the invitation of Richard Spencer. There, Khan wrote posts about everything from genes to Freud to Jewish intelligence. In one back-and-forth, he and Spencer analyzed the resemblance between Jews and the Vulcans in Star Trek.

This fall Spencer made national news after he organized a rally in Washington, D.C. that featured Hitler salutes and cries of “Hail Trump!” But Spencer “was not a white nationalist then,” Khan told me. (Recent reporting on Spencer documents him pivoting toward open support for white nationalism around the beginning of 2009, the same time that Khan joined Taki’s.)

At Discover Magazine, Khan once wondered why African bushmen are considered human, but bonobos are not.

Meanwhile, Khan’s mainstream science writing career was flourishing. He moved GNXP to ScienceBlogs, and then, in 2010, to the website of the very mainstream Discover Magazine. There, he wrote long posts about why race was biologically real. In one, he asked why African Bushmen are classified as human, and bonobos are not. In another post, he linked his science to his politics using language that’s reminiscent of white nationalist arguments: “The ultimate root of my conservatism is a fact, not a value,” Khan wrote. “That fact is that human cognitive and behavioral variation is real and important. We are not uniform.”

(“I don’t agree with that anymore, I guess,” Khan told me more recently.)

When Unz started his own site in 2013, Khan signed on as his first writer. Soon, a rotating cast of bloggers joined him. While he was at The Unz Review, Khan continued with his genetics program at UC, Davis (he recently went on leave to join a biotech startup in Austin), wrote op-eds for The New York Times, and co-authored a piece for USA Today arguing that race is biologically real.

The way Khan tells the story, he was caught off guard by the sudden rise of the alt-right, and by the extremist turn of Unz’s website. The day before I contacted him to request an interview, Khan announced that he was leaving The Unz Review. His new standalone blog, still called Gene Expression, launched in January. Over the phone, he told me that the move was partly because he wanted to be an independent blogger again, and partly because he had grown uncomfortable with some of the material on Unz’s site. He framed the issue as an image problem, not a moral one. “I wasn’t comfortable with some of the co-branding,” he said.

Hadn’t Sailer and other Unz contributors been writing things like this for years? Khan said that he used to be more tolerant of those perspectives. “Obviously, I don’t condone it,” he said. When I observed that standing by silently — and even linking to Sailer’s work — seemed like the definition of “condone,” Khan hesitated. “In terms of being at Unz, I was probably there too long,” he said.

Still, Khan insisted that his writing about the biology of race was sound. “It’s not socially acceptable to say that there might be group differences in an endophenotype — in their behavior, intelligence, anything that might have any genetic component,” Khan said. “You cannot say that, okay? If someone’s going to ask me, I’m going say, ‘It could be true.’”

Other scientists, he insisted, believe the same things. They just won’t admit it. “I’m sick of being the only fucking person that says anything,” said Khan. “I know I make people uncomfortable, but a lot of times I say what they’re thinking.”

“In terms of being at Unz, I was probably there too long,” Khan said. Visual: Undark/iStock.com

Many prominent geneticists familiar with Khan’s work do take him seriously. “I don’t agree with everything that Razib writes, but I think that he does write about population genetics very clearly,” said Graham Coop, a population geneticist at UC Davis who serves on Khan’s dissertation committee, and who has taken a high-profile stance against scientific racism.

Michael Eisen, a biologist at UC Berkeley, described Khan as “a very, very bright geneticist” who “understands modern human population genetics as well as almost anybody.” Eisen disagrees with many of Khan’s conclusions, and he said that Khan had “allied himself, in one way or another, with people whose views are not just repugnant — they’re just wrong.” But, Eisen added, “I think many of the things Razib writes highlight the implications of modern genetic research in ways that people find upsetting, but aren’t necessarily wrong.”

What does this say about the post-racial genetics that Craig Venter imagined nearly two decades ago?

It depends on how you parse it. Sarah Tishkoff, a geneticist at the University of Pennsylvania, helped write a 2016 Science paper recommending that researchers stop using the concept of race in human genetics research. Still, she told me, population clusters exist. “We can see that there are differences,” Tishkoff said. “But then you have to ask the question, ‘What do those differences mean? Do they correlate with so-called racial classifications?’ No, actually they don’t.”

Joseph Graves, Jr., an evolutionary biologist who writes about the biology of race, was more skeptical about clustering. Instead of distinct human groups, he said, one population grades into another, forming continua called “clines.” “There’s no unambiguous way to cluster individuals and say where one cluster begins and another one ends. It’s dependent upon the dataset you have. It’s dependent upon the genetic markers you look at. But the best models of human population show that we’re a continuous cline.”

Eisen made a similar point about the difficulty of making categories. But he cautioned against saying that everything is clines. “It also is not true that we’re a uniformly mixing population.”

The bigger question, of course, is why any of this matters to these scientists. Here’s one potential reason: Geneticists will soon get much better at understanding how genes contribute to complex, elusive traits like intelligence. Inevitably, some people will try to connect the dots and show that the genes influencing trait like intelligence differ between these population groups.

Khan is blunt about those implications. “Honestly, I would just sit on my hands for now,” Khan recently responded to a GNXP commenter who was curious about the relationship between race and IQ. “In the next < 5 years,” he wrote, “the genomic components of traits like intelligence will finally be characterized.”

Simply pondering such issues will strike many people as racist. Asking a question, even skeptically, can offer an implicit endorsement of its premises. But while it’s possible to fire Khan from The Times or act as if the alt-right is a marginal movement, these questions are not necessarily fringe. And there’s no agreement about when, if ever, it is appropriate to ask them.

Little illustrates those inconsistencies better than the case of Nicholas Wade, who was working at The Times as a science reporter when Khan was hired, and then dropped, from the op-ed page.

Wade’s 2014 book, “A Troublesome Inheritance,” marshals genetic evidence to argue that racial differences are real and have deep biological roots. Then Wade argues that these differences explain global disparities, such as why Haiti is more impoverished than Iceland, or why political structures in Europe are different than those in East Asia — where, Wade argues, people are genetically predisposed to be more docile.

Coop, of UC Davis, helped gather more than one hundred biologists to sign a letter to The Times denouncing the book. Even Khan described it as “not a very good book.” Graves told me that Wade is a “die-hard racist.”

After The Times dropped Khan, Eisen went on Twitter to point out the contradiction. “The thing that galled me in particular, and that led to that tweet, is they’ve been giving large amounts of print space to Nicholas Wade, who is unambiguously and unintelligently a racist in his writing,” Eisen told me. “Wade has been pushing these basically sort of facile, eugenicist views of the world for 20 years.”

“A Troublesome Inheritance” remains very popular on the alt-right, and Wade has done little to discourage this. After the book came out, he did a long, warm podcast interview with white nationalist Taylor.

“I can’t control how people use the book,” said Wade, who retired from The Times last year but still regularly contributes freelance articles to its science section — and who was himself interviewed by Khan back in 2010. Wade insisted that the book was not racist, but in an phone call, he also did not take an opportunity to disavow the white nationalists who have embraced it. He was dismissive of the controversy that surrounded “A Troublesome Inheritance,” and of the biologists’ letter to The Times. “It was an attempt to suppress a discussion of race,” Wade said. “Almost everything in the book you can find in The New York Times in my articles, and none of these guys objected at the time.”

It is true that many of the ideas expressed in the book are not exactly new. Other books — most notably “The Bell Curve,” a 1994 bestseller that infamously argued that black people are innately less intelligent than white people — have argued that racial groups are real, that there are substantial behavioral differences among them, and that those differences may explain political realities. And sociological studies of the public suggest that white Americans are likelier to ascribe a genetic cause to the behavior of black people than they are of white people.

Does that mean that uncomfortable scientific findings should be censored? Wade, Khan, and others often argue that their voices are suppressed by a politically correct academic left. In one recent Unz Review post about an academic who received blowback for speculating about racial difference, Khan wrote that “the extremely vehement reactions on this topic reveal an aspect of how ideas are policed in our society.”

I ran that notion by Graves, who in 1988 was the first African-American to receive a Ph.D. in evolutionary biology. Graves studies the evolution of aging, but, after the publication of “The Bell Curve,” he started writing about race, too. “I went through an educational system, from kindergarten through my Ph.D., that was profoundly racist and that threw roadblocks against my progression at every step of my career. I had no desire to start writing about racism in genetics and evolution. That wasn’t my interest. But I couldn’t avoid it, because those theories were being directed against me, against my family, against my friends,” Graves said.

When I showed Graves the passage about policing ideas, he sounded incredulous at the thought that these such views were being suppressed. “I don’t know what society he lives in,” Graves said. “In the societies I’ve lived in, racism has been the norm.”

A few years ago, Jacob Tennessen, an evolutionary geneticist at Oregon State University, joined Twitter. He expected to deal with creationists. Instead, he says, the aggressive pseudoscience came from racists — and, specifically, people within the human biodiversity movement, who kept arguing that traits like intelligence had clearly been subject to recent, sharp evolutionary shifts that left some racial groups smarter than others.

The people he encounters online are “pro-science and pro-evolution, but what they’re doing is not science at all,” Tennessen told me. “It’s a really dangerous pseudoscience.”

For all the attention that creationists receive, Tennessen’s kind of experience may be more typical — and more important. How, though, should geneticists respond to people who draw racist conclusions from their work? That question is only going to become more pressing. Genes continue to play an outsize role in popular understandings of human nature. Personal genetic testing services are making discussions about ancestry, race, and genes more accessible — and more commercialized — than ever before. And the internet is lending a platform to a whole new generation of tech-savvy scientific racists.

Faced with that challenge, Khan may be a textbook example of what geneticists should not do: namely, focus on the science alone, and act as if the context doesn’t matter. “The science is always prior to everything else,” Khan told me. “Everything else is just commentary. If the commentary comes before science, that’s a problem, but that’s how a lot of discourse works. I understand. I’m not trying to be naive about it. But the reality is that’s not how I work.”

Can science be severed quite so easily from politics? Khan’s own story, which includes financial and ideological entanglements with the alt-right, seems like evidence that it cannot. The belief in perfect hyper-rationality, divorced from any kind of bias or preconception, can be its own kind of political fantasy.

For better or for worse, science does have a way of working itself into political ideologies, just as political ideologies can shape the choices that scientists and others make. Historically, that’s often been the case with the study of race. Morning, the NYU sociologist, points out that new generations using new technologies often seem to circle back to old prejudices.

“There’s a long history in the West of trying to use biological data to claim that there are such things as a handful of discrete races,” she said. But “whether the ostensibly impartial data are blood types, like they would have been a century ago, or genes today, or skull sizes,” the results are familiar: “It’s always about reproducing the same hierarchy.”

Michael Schulson is an American freelance writer and an associate editor at Religion Dispatches magazine, where he helps produce The Cubit, a section covering science, religion, technology, and ethics.

CORRECTION: This piece has been updated to correct a description of Graham Coop. Coop is on Razib Khan’s dissertation committee, but is not his adviser.