ALLEN, Texas — Patrick Crusius watched the sprawling north suburbs of Dallas where he grew up dramatically change over the course of his short life. The number of Hispanic residents soared, while the non-Hispanic white population plummeted from nearly 80 percent to just more than half. Diversity flourished across Collin County, in its restaurants, shops, neighborhoods and in the public schools, where one high school welcomed both a new black student union and a prayer center for Muslims and others.

Authorities think Crusius, 21, closely noted the shift and spent countless hours on the Internet studying the white supremacist theory known as "the great replacement." And then, after hanging out with family members late last week, he jumped in his car with his newly purchased assault-style rifle and made the 10-hour drive to El Paso, where, authorities say, he fatally shot 22 people and injured dozens at a shopping center on Saturday near the Mexican border to stop "the Hispanic invasion of Texas," according to a statement police think he posted online shortly before the attack.

On Friday, police said in an affidavit for an arrest warrant that Crusius was clear about his intent. In the affidavit, which was obtained by The Washington Post, he told detectives that he shot multiple innocent victims and that he had been targeting "Mexicans."

Crusius surrendered after the shootings when police encountered his car at a nearby intersection. El Paso police Detective Adrian Garcia wrote that Crusius got out of the car with his hands in the air and declared: "I'm the shooter."

This file image provided by the FBI shows Patrick Crusius, whom authorities have identified as the gunman who killed multiple people at an El Paso, Texas, shopping area. Saturday, Aug. 3, 2019.
/ AP
This file image provided by the FBI shows Patrick Crusius, whom authorities have identified as the gunman who killed multiple people at an El Paso, Texas, shopping area. Saturday, Aug. 3, 2019.

That Crusius apparently was quietly but thoroughly indoctrinated into racist theories on websites such as 8chan, where police think he posted a missive attempting to explain his hatred, came as a complete shock to his family members back in Collin County, according to Chris Ayres, a lawyer who represents the family. He was with his twin sister, Emily, just two nights before the shooting, and he did not betray anything unusual going on in his life, Ayres said. His grandparents, with whom he lived until about six weeks ago as he attended Collin College, said they always welcomed him in their home and never had a problem with him.

"This all came out of left field," Ayres said, adding that Crusius would occasionally chat about history and current events but that no one thought his opinions were unusual. "There weren't hot political opinions flying back and forth or anything."

Crusius' parents - Bryan, a therapist, and Lori, a hospice admissions nurse - said in a statement this week that they are devastated, believing their son's actions "were apparently influenced and informed by people we do not know, and from ideas and beliefs that we do not accept or condone, in any way. He was raised in a family that taught love, kindness, respect, and tolerance - rejecting all forms of racism, prejudice, hatred, and violence."

Lori Crusius called police several weeks ago when she realized her son was in the process of obtaining an assault-style rifle, Ayres said, noting that her call was simply “informational.” She wanted to find out if he could legally have one, which he could.

Ayres said that there was no indication of why he wanted the gun - Crusius occasionally went to a gun range with his father - and that his mother had “absolutely zero concern about any violence or imminent threat.”

Investigators are looking into whether Crusius might have been radicalized online, where they say he has claimed he spent nearly eight hours a day. But friends and former teachers and classmates say he might have been hardened, too, by the tensions in his changing community in real life.

Many people here describe the diversifying community in an overwhelmingly positive way, speaking of a place that has thrived on new arrivals who have flocked here for plentiful jobs and good schools.

But some say the changes have come with a backlash.

Sisilen Simo, 19, a Liberty High School graduate, said she endured racist comments from teachers and students alike and was ultimately inspired to create a Black Student Union at the school in 2017. After President Donald Trump’s victory, students started showing up at school with “Make America Great Again” T-shirts and hats and began making jokes citing the president’s policy positions. Simo said she started hearing chatter about building the wall and banning Muslims that she said made her and other students of color feel uncomfortable.

“So when I hear the kid who shot up Walmart went to my school, part of me was surprised,” Simo said. “The other part was like, ‘This is America.’”

When Crusius was in high school, some students bullied him, friends said; one friend said a group of Spanish-speaking students harassed him in the hallways. White-supremacist groups peppered his college campus with pamphlets. And an area public official said he received threats and racist screeds from people who didn't shy away from including their real names and addresses.

Michael Phillips, a Collin College professor and historian of race relations in the Dallas-Fort Worth region, said some residents continued to espouse racist sentiments.

Shortly after the 2016 election, a flier in a Collin County town warned "Muslims, Indians, Blacks, and Jews" to leave Texas and "go back to where [they] came from" or face "torture starting now." While Crusius was a student at Collin College, fliers appeared on campus and in mailboxes around the county that spoke of dangers posed by immigrants, arguing that they are crime-prone and a threat to white women. Other fliers warned of harm from interracial dating, Phillips recalled.

This week, as north Texas baked in the summer sun, Mario Cesar Ramirez sat in the small ice cream shop he owns a few miles from Crusius' childhood home - with a Spanish menu of Mexican ice pops and traditional desserts - and contemplated the roots of Crusius' hate.

"He saw the majority started fading, shrinking away," said Ramirez, who opened his first business, a bakery, when he was 23 and now runs a taqueria chain. "He started seeing more bakeries and taco shops . . . and by the time he went to high school, it was a full melting pot."

Years ago, when Ramirez used to drop his nephew, who is a few years older than Crusius, off at the nearby Head Start program, he noticed the great diversity of the preschoolers and said he hoped they would grow up to be friends. But his idea of a welcoming, inclusive country "forever changed" in 2016 with Trump's election, he said.

"The things that Mr. Smith and Mrs. Smith used to only think, they can talk about now," he said. "You go to the movies and you will hear, 'Here come the f---ing Mexicans.' I have felt it. I have heard it."

Crusius, he said, appears to have been in some ways a symptom of that phenomenon, part of the group that now feels it can "tell us openly, 'We don't like you; you're not welcome,' " Ramirez said.

From left, Melody Stout, Hannah Payan, Aaliyah Alba, Sherie Gramlich and Laura Barrios comfort each other during a vigil for victims of the shooting Saturday, Aug. 3, 2019, in El Paso, Texas.
John Locher / AP
From left, Melody Stout, Hannah Payan, Aaliyah Alba, Sherie Gramlich and Laura Barrios comfort each other during a vigil for victims of the shooting Saturday, Aug. 3, 2019, in El Paso, Texas.

A few blocks up the road, Uriel Trujillo smiled when he talked about the diversity of the customers who frequent the Mexican restaurant his family opened in 1976. He said that when he decided to add menudo, a traditional Mexican soup made with cow's liver, to the menu a few years ago, he was nervous about how it would be received.

"But now I see Anglo people eating it, I see African people eating it," Trujillo said, remembering a white customer from San Antonio and a black customer from Louisiana separately telling him it reminded them of home. "Now we sell one every day."

Trujillo also thinks, though, about the bullying his 13-year-old son has experienced at the same middle school that Crusius attended. At times he has come home crying, complaining that other students ask him: "Are you illegal?"

The population of Collin County, north of Dallas, has more than doubled since 2000, to more than a million in 2018, according to U.S. Census data. That growth - driven in large part by the arrival of new businesses, including Toyota, Liberty Mutual and the commercial property insurer FM Global - has come with increased diversity. As the county has undergone a business and housing boom, the white non-Hispanic population fell from 77 percent in 2000 to 56 percent in 2018, while the Hispanic population tripled - from 10 percent of the county's residents to 15 percent.

"It's a microcosm of the United States," said Harry LaRosiliere, the first African-American to be elected mayor of the county's largest city, Plano. In 2017, LaRosiliere was challenged by an opponent who promised to "keep Plano suburban" - which LaRosiliere said was "absolutely a dog whistle" for some residents who want to keep the city the white, wealthy suburb they knew. His critics deny that, saying their concerns are about preserving a "suburban lifestyle" and have nothing to do with race or ethnicity.

Friends and classmates said that Crusius - who has an older brother in addition to his twin sister - grew up as a somewhat odd, lonely boy who loved snakes and playing video games such as Halo. He had difficulty interacting socially and had an aversion to loud noises - particularly music. His parents had a troubled marriage that was marred by his father's drug and alcohol problem, the father, Bryan, said in a self-published memoir in 2014.

In 2013, Patrick Crusius was enrolled in Liberty High School, where his mother, Lori, taught health sciences. She resigned from her teaching position in June 2014 to return to nursing, and her son ultimately enrolled in Plano Senior High School, where classmates said he was bullied.

Allison Pettitt, a classmate, said she saw Crusius pushed around in the hallways and "cussed out by some of the Spanish-speaking kids." She said that bullying was common at the school and that teachers often ignored it.

"He started getting more depressed closer to the end of junior year," Pettitt said. "He started wearing a trench coat to school and becoming more antisocial and withdrawn."

Congregants holds hands as they sing during a morning service at St. Pius X Church in El Paso, Texas on Sunday, August 4, 2019.
Vernon Bryant / AP
Congregants holds hands as they sing during a morning service at St. Pius X Church in El Paso, Texas on Sunday, August 4, 2019.

Lesley Range-Stanton, a spokeswoman for Plano's school district, declined to comment about whether Crusius was bullied, citing student privacy.

In the fall of 2017, Crusius enrolled in a local community college, Collin College, imagining he might one day have a career in software development.

"I'm not really motivated to do anything more than what's necessary to get by. Working in general sucks, but I guess a career in Software Development suits me well," he wrote in his LinkedIn profile.

But according to the missive published online just before the shooting, he became increasingly disillusioned. Classmates said he would mutter to himself in class.

Then he bought a gun several weeks ago.

It is unclear how long Crusius might have been planning the mass shooting of which he is accused, but he moved out of his grandparents' home about six weeks before the shooting, and it appears he wrote an online composition some time ahead of the attack, posting a rambling screed that borrowed language and ideas from white supremacist propaganda and parroted ideas that Trump has espoused about a minority "invasion."

In that statement, he allegedly said that "Hispanics will take control of the state and local government of my beloved Texas" and ultimately destroy the country.

After his 10-hour drive to the Mexican border, police said he became lost in a neighborhood and stopped at a Walmart because he was hungry. Then he allegedly strode through the parking lot and the store, gunning down shoppers with a blank look on his face. Ultimately, 22 people, including eight Mexican citizens, would die.

Crusius is charged with capital murder, and federal authorities are investigating the massacre as a potential domestic terrorism attack.

The Washington Post’s Robert Moore in El Paso and Mark Berman in Washington contributed to this report. Nevins is a freelance journalist based in Texas.