Media playback is unsupported on your device Media caption 'Get the hell out of here!' - listen to the alleged attack

A Montana politician charged with assaulting a reporter has apologised and made a substantial donation to a press freedom charity.

Greg Gianforte was accused of attacking a journalist from the UK's Guardian newspaper a day before his election.

The congressman said he was making a $50,000 (£38,000) donation to the Committee to Protect Journalists (CPJ).

The Guardian said the apology and donation was "part of an agreement that settles any potential civil claims".

A letter sent by Mr Gianforte to journalist Ben Jacobs offered a "sincere apology".

"My physical response to your legitimate question was unprofessional, unacceptable and unlawful," it said.

Mr Gianforte, who won the election, is still facing a criminal charge of misdemeanour assault, for which the maximum penalty is a $500 fine and a six-month jail term.

Image copyright Getty Images Image caption After first claiming Mr Jacobs had been aggressive, the new congressman later apologised

He "grabbed Jacobs by the neck with both hands and slammed him into the ground" after the reporter persisted in trying to question him about healthcare policy, another reporter from Fox News, who witnessed the confrontation, said.

"I watched in disbelief as Gianforte then began punching the reporter. As Gianforte moved on top of Jacobs, he began yelling something to the effect of, 'I'm sick and tired of this!'" Alicia Acuna said.

Mr Jacob's glasses were broken during the incident.

Mr Gianforte initially claimed Mr Jacobs had grabbed his wrist, pulling them both to the ground. His spokesperson called it "aggressive behaviour from a liberal journalist".

But in his formal apology to Mr Jacobs on Wednesday, he said: "Notwithstanding anyone's statements to the contrary, you did not initiate any physical contact with me, and I had no right to assault you. I am sorry for what I did and the unwanted notoriety this has created for you.

"I take full responsibility," he added.

Image copyright Twitter

The apology also detailed the donation to the CPJ, "in the hope that perhaps some good can come of these events".

The CPJ is an independent non-profit group that promotes press freedom globally.

In a tweet, the group said it had accepted the donation for what it called Mr Gianforte's "unacceptable behaviour toward a journalist just doing his job".

In the Guardian, Mr Jacobs said he had accepted the apology.

The newspaper had previously covered Mr Jacob's acquisition of a new pair of glasses from a London optician - noting that he donated the pair broken in the clash to Washington DC's press museum, the Newseum.