Kentucky’s Republican House speaker resigned his leadership position Sunday after acknowledging he settled sexual harassment claims from one of his staffers last month.

Jeff Hoover denied sexually harassing the staff member, but said he sent inappropriate text messages that were consensual. Hoover’s wife and two of his three daughters were in the room as he spoke.

“I engaged in banter that was consensual but make no mistake it was wrong on my part to do that. And for that, I am truly sorry,” Hoover said. “I want to reiterate that at no time, at no time did I engage in unwelcome or unwanted conduct of any kind.”

Thomas Clay, a Louisville attorney who represents the victim, said his client had “legitimate concerns about workplace conduct.”

“Our client was not coerced by anyone to resolve the matter and has been satisfied with the resolution,” Clay said. “We look forward to moving past this matter.”

Hoover said he will remain in the legislature. House Speaker Pro Tempore David Osborne will become the acting speaker.

The resignation comes amid a brutal legislative fight to change the state’s struggling public pension system. Gov. Matt Bevin’s proposal would eventually end Kentucky’s pension system and replace it with a 401(k)-style retirement plan for state workers and public school teachers.

The bill has the votes in the Senate, but not the House. Hoover had said he would not vote for the bill without changes, and he has been critical of some of Bevin’s comments about teachers and other state workers.

“It’s fair to say I am not the favorite legislator of some in this capitol,” Hoover said without mentioning Bevin’s name.

On Saturday afternoon, House Republican leaders announced they planned to hire a private law firm to investigate the allegations and would grant them the power to subpoena witnesses. A news release Sunday said the investigation will continue.

Hoover said he received a letter on Oct. 17 from a lawyer whose client made allegations of sexual harassment against Hoover and others. He said everyone reached an agreement on Oct. 25. Hoover said no one admitted wrongdoing and everyone agreed to keep the settlement secret because the victim was going to keep her job.

But Wednesday evening, The Courier-Journal reported the settlement, based on anonymous sources, which eventually led to Hoover’s resignation.

Hoover has been speaker since January, shortly after Republicans won a majority in the state House for the first time in nearly a century. The victory gave Republicans control of every state legislative chamber in the South.

“I have asked for and received forgiveness from God, my family, my wonderful wife, Karen, and my daughters,” Hoover said. “The decision today is what is best for Kentucky. And what is best for the House of representatives that I love and have spent 21 years here.”