The newly elected Montana congressman who, on the evening before his election reportedly body slammed a newspaper reporter, issued an apology to the newsman and said he will donate to the Committee to Protect Journalists.

Congressman-elect Greg Gianforte, R-Mont., said in an apology letter Wednesday that he “had no right to assault” the reporter.

Gianforte’s letter to Ben Jacobs of The Guardian is part of a settlement with Jacobs in which the reporter agreed not to object to Gianforte entering a plea of “no contest” to a misdemeanor assault charge.

“I write to express my sincere apology for my conduct on the evening of May 24. My physical response to your legitimate question was unprofessional, unacceptable, and unlawful,” Gianforte wrote in the letter. “As both a candidate for office and a public official, I should be held to a high standard in my interactions with the press and the public. My treatment of you did not meet that standard.”

As part of the settlement, the Republican agreed to contribute $50,000 to the Committee to Protect Journalists.

Jacobs accepted Gianforte’s apology and said in a statement he hopes the incident will reinforce respect for freedom of the press and encourage more civil discourse.

“I hope the constructive resolution of this incident reinforces for all the importance of respecting the freedom of the press and the First Amendment and encourages more civil and thoughtful discourse in our country,” he said.

On the eve of the Montana House special election last month, Jacobs said he was “body slammed” by Gianforte after trying to ask him a question about health care.

Gianforte defeated Democratic candidate Ron Quist for the House seat on May 25.

The Associated Press contributed to this report.