The candidate in a Montana special election who was charged with assault just before the election has won.

Republican Greg Gianforte is accused of body slamming a reporter just the day before the special election.

On Wednesday, Guardian reporter Ben Jacobs told the world that the congressional candidate had body slammed him and the newspaper released audio to back him up.

On Thursday, voters went to the polls and elected Gianforte amid the controversy, beating Democratic candidate Rob Quist.

Gianforte had already been favored to win, but the incident did cast some doubt, with the Democratic Congressional Campaign Committee calling on him to step down.

However, because the incident happened so close to the election, many people had already early voted. According to CNN, 259,558 votes — of the state's 700,000 registered voters — voted early.

In his acceptance speech, Gianforte apologized to the reporter.

"I'm not proud of what happened. I should not have responded in the way that I did. And for that I'm sorry," he said. "I should not have treated that reporter that way. And for that I'm sorry, Mr. Ben Jacobs."

The apology was a change of tone from his campaign's original statement, which denied any wrongdoing by Gianforte.

Speaker of the House Paul Ryan told reporters on Thursday that Gianforte should apologize.

This race was already being closely watched by politicians.

A Democrat has not won the congressional seat for two decades and President Donald Trump won the state by 20 points in November.

Gianforte is scheduled to appear in court between now and June 7 for the misdemeanor assault.