BOZEMAN, Mont. — Greg Gianforte, a wealthy Montana Republican who was charged with assaulting a reporter on Wednesday, nonetheless won the state’s lone seat in the House of Representatives on Thursday, according to The Associated Press, in a special election held up as a test of the country’s political climate.

Mr. Gianforte, 56, was widely seen as a favorite to win against Rob Quist, a Democrat and country music singer. But he seemed to imperil his own candidacy in the final hours of the race after he manhandled a journalist for The Guardian.

Addressing the altercation for the first time late Thursday night, Mr. Gianforte apologized to the Guardian reporter, Ben Jacobs, by name, acknowledged he “made a mistake” and vowed to the state’s voters that he would not embarrass them again.

“You deserve a congressman who stays out of the limelight and just gets the job done,” he said to a group of supporters at a hotel in Bozeman, who repeatedly yelled out that they forgave him.