A prominent Tennessee lawmaker has agreed to step down amid controversy involving texts between him and a former aide, which prompted a vote of "no confidence" from his own party.

Republican state House Speaker Glen Casada made the announcement on Tuesday, after ex-chief of staff Cade Cothren stepped down over allegations of sending racist and sexist messages to him three years ago. Casada admitted to responding to two of those messages, according to WKRN.

GROUP WANTS TENNESSEE DA TO RESIGN OVER ANTI-ISLAM POST

"I participated in some 'locker room talk' if you will, amongst two adult men. I’m not proud of that. I’m embarrassed about that,” Casada said in a radio interview.

Casada was also accused of trying to interfere with a related ethics report, but he denied this.

The House Republican Caucus passed a "no confidence" resolution with a 45-24 vote on Monday. Initially, Casada did not appear swayed by this.

"I’m disappointed in the results of today’s caucus vote," Casada said. "However, I will work the next few months to regain the confidence of my colleagues so we can continue to build on the historic conservative accomplishments of this legislative session."

Mounting pressure, including from Republican Gov. Bill Lee, ultimately led Casada to change his mind.

"When I return to town on June 3, I will meet with caucus leadership to determine the best date for me to resign as speaker so that I can help facilitate a smooth transition," Casada said in a statement.

TENNESSEE DEATH ROW INMATE DIES OF CANCER AHEAD OF OCTOBER EXECUTION

Gov. Lee supported the decision, stating it was the right call from the representative, who had only been House speaker since January.

“Speaker Casada has made the right decision, and I look forward to working with the legislature to get back to conducting the people’s business and focusing on the issues that matter most to our state,” Lee said in a statement.

The Associated Press contributed to this report.