Polls closed Thursday night in a Montana special House election that was jolted by a last-minute misdemeanor assault charge filed against the Republican candidate.

The contest between Greg Gianforte and Democrat Rob Quist had been viewed as another in a series of local referenda on President Donald Trump's young administration. But the scrutiny intensified after Gianforte was accused of attacking Guardian reporter Ben Jacobs at Gianforte's campaign headquarters Wednesday evening, an encounter witnessed by a Fox News crew.

FOX NEWS TEAM WITNESSES GOP HOUSE CANDIDATE 'BODY SLAM' REPORTER

Shaun Scott, a computer science professor at Carroll College in Helena, voted for Gianforte despite the assault charge, saying it was barely a factor in his decision.

"If you have somebody sticking a phone in your face, a mic in your face, over and over, and you don't know how to deal with the situation, you haven't really done that, you haven't dealt with that, I can see where it can ... make you a little angry," he said.

Like a third of eligible voters in Montana, advertising executive Cailley Tonn of Bozeman had already mailed in her absentee ballot when the melee occurred at Gianforte's campaign headquarters.

Still, she said, the incident would not have changed her vote for Gianforte.

"I was disappointed to see he flew off the handle like that," she said.

But in the end, she added, her choice was about affirming the Republican platform.

The Gallatin County Sheriff's Office cited Gianforte for misdemeanor assault and he has until June 7 to appear in court. If convicted, Gianforte could face up to six months in jail and a $500 fine.

Gallatin County Sheriff Brian Gootkin said Gianforte was charged with a misdemeanor instead of a felony because no weapon was used and Jacobs was not seriously injured. The county prosecutor is reviewing the case.

The technology executive kept a low profile Thursday, canceling television interviews and keeping out of sight even as his supporters readied a victory party. His campaign has blamed Jacobs, contending he aggressively shoved his phone in the candidate's face and grabbed Gianforte's wrist as the Republican tried to move it away.

Montana backed Donald Trump by 20 percentage points over Hillary Clinton this past November, but also re-elected its Democratic governor, who defeated Gianforte in November by 5 percentage points.

Voters lean Republican and prefer iconoclasts along with limited government and their right to bear arms.

Gianforte hit upon these themes in the race to replace Montana's previous congressman, Ryan Zinke, who became Trump's Interior secretary in March.

The Republican candidate focused on protecting the 2nd Amendment and tried to tie Quist, a first-time candidate, to liberal Democrats such as House Minority Leader Nancy Pelosi, D-Calif.

But the theme of the election shifted Wednesday night when Jacobs walked into Gianforte's office as he was preparing for an interview with Fox News.

Three of Montana's biggest newspapers pulled their endorsements of Gianforte — without endorsing his opponent — while leaders of both major parties called on him to apologize.

House Speaker Paul Ryan, R-Wis., said what occurred was "wrong and should not happen." Pelosi called Gianforte "a wannabe Trump."

Republican Tina Stark of Townsend said she doesn't know Gianforte or whether has a temper.

"But I can understand how somebody could push somebody's buttons," she said. "I don't advocate violence, but when you're told to back off, you need to back off."

Some voters didn't see the attack altering the dynamics of the contest, which has dominated state politics for weeks.

"I don't think it probably changed very many minds or votes today, unfortunately," said Patrick Paradis of Helena, who voted for Quist. "Politics are pretty entrenched right now in terms of who people are going to follow and who people are going to vote for."

The Associated Press contributed to this report.