The man stumbled into the police precinct in Manhattan’s Hell’s Kitchen district late one night, staggering toward a tall reception desk painted black and blue. Before the desk officer could ask the man his business, he collapsed on a bench, dripping blood.

When officers pulled up his shirt, they found a series of deep stab wounds in his dark skin. As they struggled to stem the bleeding, they asked the man who had attacked him, but he could only groan. He died minutes later at a Manhattan hospital without saying a word.

Police scrambled to make sense of the March 20, 2017, slaying. A witness had seen the victim tussling with someone on the street half a block away. Surveillance footage showed a young white man with a black coat and neatly parted blond hair fleeing the scene.

But the motive was a mystery. And by the following evening, police still had no leads on the suspect.

As two dozen officers gathered in Times Square — nine blocks from the crime scene — at midnight to continue the search, a solitary figure suddenly emerged from the stream of tourists. His flaxen hair was carefully combed.

“I’m the guy you’re looking for,” James Harris Jackson said, calmly slipping off his black jacket and setting it down in front of an officer. “There are knives in that coat.”

For the next five hours, in a videotaped interview, Jackson proudly told detectives how he had stabbed Timothy Caughman in the back with a Roman-style short sword simply because he was black.

Caughman, the 28-year-old Army veteran explained, was “practice” for a bigger attack in which Jackson aimed to kill as many black men with white women as he could.

“I was looking to get black men scared and have them do reciprocal attacks,” he said, “and inspire white men to do similar things.”

•••

The idea of a race war is older than the United States, fueling the brutal treatment of Native Americans and enslaved blacks by white colonists fearful of uprisings. It has continued to inspire violence ever since, from decades of Ku Klux Klan lynchings to the massacre of nine black churchgoers four years ago in Charleston, S.C.

“It’s part of the intellectual milieu of hardcore white supremacy, this notion that there will be, may be or should be some sort of future race war,” said Mark Pitcavage, an expert on right-wing extremism at the Anti-Defamation League.

It stems from a basic white-supremacist belief: that whites are in imminent danger of being wiped out. Some adherents prepare for what they see as an inevitable cataclysm by stockpiling weapons and training for combat. Others go further, actively trying to spark racial strife while whites are still in the majority.

The Department of Homeland Security now considers white-supremacist violence as great a threat to the country as ISIS or al-Qaida, according to a report released in September.

And the internet has made it vastly easier for extremists of all types to spread their messages of hatred.

Websites such as the Daily Stormer, which has a timer counting down to when whites will supposedly be a minority in the United States, stoke a sense of crisis, said Keegan Hankes, an analyst for the Southern Poverty Law Center.

Dylann Roof was a regular commenter on the Daily Stormer before murdering nine black worshipers at a Bible study in Charleston in 2015.

“I did what I thought would make the biggest wave,” he wrote from jail, “and now the fate of our race is in the hands of my brothers who continue to live freely.”

Roof has become a cult figure among white supremacists, especially those who espouse racial violence.

Jackson, who declined to be interviewed for this story, idolized Roof before emulating him.

Yet the idea of race war could not have been more alien to his upbringing. His transformation — from Quaker school choir boy to self-described Nazi — would shock his liberal family, from whom he had hidden his hate.

But a trove of e-mails, text messages, Web searches and other documents obtained by the Washington Post show his descent was far from sudden. Instead, he struggled with racist thoughts and violent impulses for most of his life before sinking into an online world of white-supremacist propaganda, where his personal obsessions were sharpened to a lethal edge.

•••

Harris, as everyone called him, was the second of three boys born into an affluent family. His consultant father and teacher-turned-homemaker mother kept a Barack Obama “Hope” magnet on the refrigerator, he would later tell police. His grandfather had helped desegregate schools in Shreveport, La.

In the fall of 2003, 15-year-old Jackson began attending the elite Friends School of Baltimore, where his older brother had gone. The shady 34-acre campus shared the same values as his parents: diversity, tolerance and pacifism.

There were few signs at Friends that Jackson harbored any hatred, according to interviews with a dozen classmates, teachers and administrators.

Ghani Raines, who taught Jackson history, said he never detected any racism in his pupil, though the educator was the embodiment of everything Jackson would eventually try to destroy.

“I was a black man married to a white woman, with mixed-race children,” he said. “I would sometimes bring my infant daughter to school. If he was mired in this hatred, then he must have hated me. And yet I had no idea.”

But some classmates remember Jackson differently. His senior year, he was one of about 30 Latin students to travel to Italy during spring break. As the group toured ancient Roman ruins, Jackson turned to a student he barely knew and said that his grandfather had admitted on his deathbed to being in the SS.

“He always liked to say his grandfather fought for the Nazis,” added another classmate. “It was his claim to fame.”

Except, his family said, it wasn’t true. Both of his grandfathers served in the U.S. Army.

•••

Jackson fought for the Americans, too.

After flunking out of Ohio Wesleyan University his first semester, he enlisted in the Army and was sent to Germany, then Afghanistan.

He never showed any signs of racism, according to a fellow soldier who spoke on the condition of anonymity, who said that Jackson got along with his unit’s black, Hispanic and Asian service members, including his direct supervisor, who was black.

Jackson would describe his time in the Army as one of the happiest periods in his life.

But when that mission came to an end in the fall of 2012 with an honorable discharge and a holiday in Italy, Jackson found himself consumed by suicidal impulses.

As he sat in a hotel suite hot tub in Rome, he thought about cutting his wrists. When he walked over the Tiber River, he contemplated throwing himself in but couldn’t.

“As I got on the plane to come home,” he wrote, “I knew I had made a terrible mistake.”

•••

Jackson foundered after returning from his overseas stint in the Army. His parents encouraged him to get a job, but he didn’t. He took online cybersecurity courses at what was then University of Maryland University College through the GI Bill but never got a degree.

Instead, Jackson spent up to 18 hours a day on the internet, where his personal obsessions over race and sex were honed into a plot to start a race war.

“I have always had an inexplicable and instinctual murderous hatred of white women who sleep with black men,” he wrote in a 2013 suicide note. At that time, however, he described the emotion as “utterly irrational.”

“Again I stress that it only bothers me for a second and that I am not a racist, as I have African ancestors as do we all,” he wrote.

But by early 2017, his views had hardened amid a toxic digital deluge.

In the three months before his attack, Jackson visited websites related to white supremacy on 415 occasions — an average of nearly five times a day — according to the analysis later done by prosecutors. He visited sites about Nazism another 139 times during that period.

As he sank deeper into this sick world, he also began assembling a small arsenal: a hunting rifle, a shotgun, two knives and a Roman-style “Gladius” sword purchased on Amazon for $56.

•••

Timothy Caughman had spent his whole life in New York. At 66, he had held all kinds of jobs, from promoting concerts to finding work for poor teens. Lately, he had taken to Twitter, proudly posting photos of himself with celebrities or tributes to fallen stars.

“Standing in line waiting to vote,” he wrote under a selfie he tweeted on Election Day. “I love America.”

Unmarried and childless, he lived in a modest room at the Barbour Hotel on West 36th Street, where most of his neighbors were recently homeless. He was sometimes mistaken for homeless himself, collecting cans from the trash to pay for trips to Washington, where he enjoyed attending congressional hearings.

He was picking up cans when Jackson spotted him shortly after 11 p.m. on the first day of spring, hunched over a plastic bag on Ninth Avenue half a block from his home.

Jackson sank the sword into his unsuspecting victim’s back. But Caughman — who had been nicknamed “Hard Rock” as a young man in South Jamaica, Queens, for his boxing ability — fought back with strength that surprised his attacker. Jackson pulled the sword out and stabbed him again in his chest so hard that the tip went through him and broke on the sidewalk.

“What are you doing?” Caughman asked, Jackson would later tell police.

In a city of thousands of security cameras, only one captured the struggle, the murder reduced to two dark shapes reflected in the murky water of a Manhattan bike lane.

As Caughman stumbled into the police station, Jackson zigzagged through the city, stopping at a McDonald’s bathroom, where he tried to wash the blood off his clothes.

He slept for a few hours in Penn Station before Googling “NYC stabbing” and discovering surveillance photos of himself as a “person of interest.”

Jackson spent the afternoon in a public library, where he read a book about ancient Greek government and news about the murder. Then he wandered to a mall on the edge of Central Park. It was closing time, and as he looked down from the top floor, he thought about leaping into the atrium, he would later tell police. But he couldn’t bring himself to do it.

Instead, he tried to muster the courage for the mass attack in Times Square. But as he stalked the neighborhood of neon lights and blinding billboards in search of interracial couples, he spotted so many that he became overwhelmed.

“It was just really demoralizing,” he told investigators later. “Maybe it’s just too far gone.”

Police were gathering inside the Times Square substation to look for him when he approached the officer at the front door. He cleared his throat and told them their hunt was over.

•••

Jackson’s arrest made front-page news across the country. But prosecutors were surprised at how quickly the story faded.

“The coverage of the case was not as extensive or as deep as I thought it would be, given all that was going on in America at time, and its outrageousness,” said Manhattan District Attorney Cyrus Vance Jr., who charged Jackson with murder as a hate crime and murder as terrorism. “Had he come from ISIS and hunted Jews and then killed a Jewish man, I think there would have been much more attention.”

Two months after Donald Trump’s inauguration, the nation was still trying to understand the so-called “alt-right” wave that had helped propel him to office. It would be another five months before hundreds of white supremacists and neo-Nazis descended on Charlottesville for the “Unite the Right” rally — a gathering that would end in violence and expose the alt-right for what it really was.

In online chat rooms, some white supremacists hailed Jackson as a “hero.” But others mocked him for killing just one person.

Two years after the murder, he was sentenced to life without parole.

Detective Thomas Schick, who worked on Jackson’s case, considered the crime a window into the growing problem of white supremacy in America.

“We need to know where this train of thought is coming from, how it’s being perpetuated in these hate groups,” he said. “It’s the same thought pattern used back by the Ku Klux Klan.”