At age six, Safiya Wazir and her family fled war and persecution in Afghanistan as the Taliban seized control of her native Baghlan province. At 16, she arrived in the United States with no English after spending more than a decade as a refugee in Uzbekistan. At 22, she became an American citizen. And now, at 27, she has unseated a four-term New Hampshire state representative in a Democratic party primary.

Wazir defeated 66-year-old incumbent Dick Patten. If she can win the general election in November, she will become the first refugee to hold office in the state.

Her victory was in a small race in an outlying part of New Hampshire’s capital, a neighborhood known mostly for its dying shopping mall, the division of motor vehicles office and long string of fast-food restaurants. But the race mirrors what has been happening on a broader scale elsewhere: young, progressive women of minority backgrounds have launched and won insurgent campaigns.

Wazir’s victory is doubly impressive given that it came in a small state home to one of the whitest (94%) and oldest populations in the nation.

Having somebody young, new blood in the system, I think it would be really helpful for all, from seniors to immigrants and refugees Safiya Wazir

“Having somebody young, new blood in the system, I think it would be really helpful for all, from seniors to immigrants and refugees. That really gives a new perspective,” Wazir said.

Wazir’s journey into politics was a difficult one.

Arriving in the US, her first impressions of Concord were of loneliness and huge piles of snow.

Wazir and her parents found themselves alone in a strange country where they could not communicate with anybody. They were helped by a Lutheran organisation that assists with refugee resettlement in the area, but the food they were provided with was unfamiliar, like peanut butter and sliced bread. Unsure of how to prepare what they were given, her mother would just cook rice, which they would eat on the three plates they were provided. When their case manager would come by their home to check on the family, Wazir would try to draw the items they needed.

To learn English, Wazir studied a well-worn Dari-English dictionary and paid close attention to what native speakers said. As a refugee in Uzbekistan, she had to learn Uzbek and Russian; her third foreign language came easy to her.

She started working jobs at Walmart and Goodwill not long after she began high school to help her family make ends meet. After she graduated in 2011 aged 20 – older than most students as she had to restart her secondary education – she decided to attend the New Hampshire Technical Institute, a local community college. She took night classes so she could continue working, but that meant graduating took five years.

In 2013, she gained American citizenship and was pregnant with her first child.

“It was a beautiful moment. I couldn’t hold back my tears,” she said. “I said: ‘I’ve finally found my home where I can deliver my baby as a proud mom of a US, American citizen.”

In 2013, Wazir became a citizen and was pregnant with her first child. ‘I couldn’t hold back my tears,’ she said. Photograph: Josh Wood/The Guardian

However, she now worries that others may not be able to follow in her footsteps.

Just days after Wazir’s victory, the Trump administration announced that the US would take in a maximum of 30,000 refugees next year, down from a cap of 45,000 this year and 50,000 in 2017. Donald Trump has made limiting immigration a key point of his administration and has repeatedly painted refugees as potential threats to the nation’s security.

Between 2010 and 2017, 1,422 refugees were resettled in Concord according to statistics from the New Hampshire department of health and human services. While seemingly not an overwhelming number, their presence was felt in a city of just 43,000.

Many of Concord’s refugees have settled in the Heights, the neighbourhood where Wazir’s race is taking place. The majority of refugees there are Bhutanese and several stores selling south Asian foods and spices have been established on Loudon Road, the main thoroughfare of the Heights.

Downtown Concord is festooned with the flags of different nations as the city celebrates its diversity with its annual welcoming week. But not all in the city are pleased by changing demographics.

In losing the primary, Patten lashed out at recent immigrants.

At the polls, he told the Concord Monitor that minorities who recently arrived to Concord were “getting everything”. Speaking to the Boston Globe, he said: “It used to be the Heights would support a Heights person … but the Heights has changed, basically, from what it used to be. We have many immigrants in there now, and she’s from Afghanistan so she was treated like the princess.”

He also questioned how Wazir – who has two daughters and is pregnant with a third child – could balance motherhood with public service.

Patten now plans on backing Wazir’s Republican opponent, Dennis Soucy, in the general election. He told the Globe he was backing Soucy because the Republican had been in the Heights for decades.

In an interview with the Guardian in her Concord home, Wazir said she was choosing not to respond to Patten’s statements except to say that immigrants like her are a part of the city’s fabric today.

“We’re also part of the community,” she said. “We also work hard for New Hampshire. We pay our taxes. We earn money and we spend it here.”

She does not credit her victory to the growing immigrant community in the area; she says it was her persistent door-knocking in the neighbourhood and interactions with the people of the Heights that won her the primary.

But immigrants and refugees in Concord could again become a flashpoint in the general election.

Posts on the public Facebook page of her Republican challenger point to hardline anti-immigrant and anti-Muslim views.

On 12 September, the day after the primary, Soucy shared a meme depicting what appears to be a smiling Middle Eastern man with the words: “We can kill as many as we want and your stupid government keeps letting us in.”

Another meme shared by the account in August reads: “Muhammad owned many slaves. Robert E Lee was against slavery. So why are we tearing down statues instead of mosques?”

If Wazir wins the general election on 6 November, she will become the first refugee to be elected to serve in the New Hampshire state house. Photograph: Josh Wood/The Guardian

In a written statement to the Guardian, Soucy charged that Wazir has never voted, does not know the community and does not have the best interests of the community in mind. Wazir says she has voted in local, state and national elections, has been a part of the community for 11 years and is committed to representing the Heights.

While Soucy provided a written statement to the Guardian after being contacted multiple times, he was not open to responding to specific questions. After the Guardian inquired about his stance on immigration and asked about the memes on his Facebook page, one of the memes was deleted.

Wazir says she has tough skin; as a refugee in Uzbekistan, she faced discrimination and her classmates taunted her by calling her a “terrorist” because of where she was from. Despite the openly anti-immigrant attitudes some people in the state hold, Wazir says she has been comfortable in New Hampshire and not run into discrimination.

The New Hampshire Young Democrats helped Wazir organise her campaign and reached out to voters by mail and text on her behalf. The group’s president, Lucas Meyer, said Wazir’s victory was a very promising sign.

“There are some ugly spots in this where people made some pretty disgusting remarks about her win, but I think the overwhelming majority of response has been incredibly positive,” he said. “In an otherwise pretty depressing, divisive political world right now, this is a moment of clarity and inspiration for a lot of people.”

One of those inspired already is Rajesh Chauwan, who came to the US as a Bhutanese refugee a decade ago and works at the New African Asian Market in the Heights. He said he was excited by Wazir’s victory and what it would mean for New Hampshire’s refugee and immigrant communities.

“That will encourage the population,” he said. “Now we can do something in our new country.”