BOZEMAN, Mont. -- A Montana Republican businessman won the state's U.S. House seat after being charged with assaulting a reporter on the eve of the election, a victory that may temper Democrats' hopes for a massive anti-Trump wave next year.

Greg Gianforte apologized late Thursday for attacking a reporter who had asked about the GOP health care bill.

"Last night, I made a mistake. I took an action I can't take back and I am not proud of what happened," he said.

Yet Gianforte's 6 percentage point win paled to President Donald Trump's 20 percentage point romp in Montana in November, a sign that Republicans will have to work hard to defend some of their most secure seats to maintain control of Congress.

The race ultimately turned on the weaknesses of both Gianforte and his opponent, folk singer and Democrat Rob Quist, making it tough to use as a barometer for the nation's political mood. Gianforte got 50 per cent of the vote, Quist received 44 per cent and Libertarian candidate Mark Wicks received 6 per cent.

Gianforte was cited for misdemeanour assault Wednesday night after witnesses said he slammed to the ground a reporter who was asking him questions about the Republican health care bill. A technology entrepreneur who was widely regarded among even Republican strategists as an imperfect candidate, Gianforte could be heard on an audio tape yelling at the reporter, Ben Jacobs of The Guardian.

By the time sheriff's deputies arrived, more than half of voters had already cast their ballots in the race due to the state's mail-in voting law. It was difficult to determine on election night to what extent voters who cast a ballot Thursday were influenced by the altercation.

Gianforte had aligned himself with Trump. And the president, in Italy for a G-7 summit, said to journalists after Gianforte's victory: "Great win in Montana."

After the altercation Wednesday, Gianforte's campaign issued a statement blaming the reporter. The Republican candidate cancelled television interviews and stayed out of sight while the polls were open Thursday.

But after he was declared the winner, Gianforte apologized for the attack.

"When you make a mistake, you have to own up to it. That's the Montana way," he said. "Last night, I made a mistake. I took an action I can't take back and I am not proud of what happened."

The chairman of the National Republican Congressional Committee, Rep. Steve Stivers, issued a statement hailing Gianforte's win, as well as his apology. "Now he needs to resolve his legal issue so that he can start off on the right foot serving his constituents," Stivers said.

Gianforte must appear in court by June 7 on the misdemeanour charge, which carries a maximum penalty of six months in jail and a $500 fine.

Stivers' Democratic counterpart, Rep. Ben Lujan of the Democratic Congressional Campaign Committee, contended in a statement that the election was "tainted" by the assault. "There's no question in my mind that Gianforte should not be sworn into office," Lujan said. "Regardless of what happens next, we will be competing hard for this seat in 2018."

The assault allegation didn't seem to faze voters. Shaun Scott, a computer science professor at Carroll College in Helena, voted for Gianforte despite the assault charge because he felt Gianforte would do a better job helping create high technology jobs in Montana.

"I would rather not have seen that situation, but 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," Scott said.

Gianforte had unsuccessfully challenged the state's Democratic governor in November, losing that race even as Trump won the state easily. Gianforte had held his party's nominee at an arm's length but during the special election, he embraced the president, welcoming Vice-President Mike Pence and Donald Trump Jr. for campaign visits and using the president's "Drain the swamp" catchphrase.

His opponent, Quist, was previously best known as the singer in the Mission Mountain Wood Band. He surprised Democrats by nabbing his party's nomination at its convention in March. A supporter of Vermont Sen. Bernie Sanders, Quist had never run for office before. Democrats were initially hopeful that he'd appeal to Montana's right-leaning voters who have a history of electing Democratic mavericks.

But Republicans rapidly mounted a wilting attack on the airwaves over Quist's financial troubles, including a history of unpaid taxes and liens. They bashed him as a tool of liberal Democrats like House Majority Leader Nancy Pelosi. Quist eventually raised more than $6 million but struggled to come back from the early onslaught of negative publicity and advertising. He attacked Gianforte as a transplant from New Jersey ---- Gianforte moved to the state in the 1990s -- which was a potent issue during the gubernatorial race but not enough to get Quist across the finish line.

Gianforte's support came from people like Bozeman advertising executive Cailley Tonn, who voted early for Gianforte. After the alleged assault, she said she wouldn't have changed her vote. "I was disappointed to see he flew off the handle like that," she said.

But in the end, she added, she wanted to back the Republican party's platform.

Democrats made a late investment in the race. Hours after Gianforte's scuffle with the reporter, Democrats were blasting Facebook ads at Montana Democrats they thought might otherwise sit out election day. But it was too late to do any more advertising.