In the 13th Senate district, where Mr. Katkuri lives, one in five residents are immigrants. The district had been Republican for longer than Mr. Katkuri had been in the United States. He came in 2006 at the age of 25 as a tech worker, and lived for a while in New Jersey. But it was congested and expensive, and crime was high. After visiting a friend in Virginia, he moved.

“You drive from the northeast and you fall in love,” he said of Virginia. The state felt more like what he had imagined America would be. “I like the wide roads and green trees. In India, we didn’t have this.”

He added, smiling: “It’s like a therapy.”

Today he works as an I.T. specialist for a company that contracts with the federal government, a job that has landed him in the upper middle class of American society. He drove to the Indian grocery in his silver Tesla. He has a house in the tidy suburb of Arcola a few miles away.

As Virginia’s population has grown it has also gotten wealthier. Households earning at least $150,000 have grown at three times the rate of the population over all.

Mr. Katkuri always thought he would be a Republican in America.

“Taxes, family values, these things are closer to our hearts,” he said. He likes Mitt Romney.

But when he got his citizenship in March and started talking with his friends about whom to vote for in the first election of his life, he realized it had to be Democrats. Mr. Trump helped him decide.

“The way he speaks, you get the feeling that you are separate,” Mr. Katkuri said. “This is not what we signed up for in America.”