Missouri House Speaker John Diehl said Thursday that he is resigning from the Legislature after acknowledging that he exchanged sexually suggestive text messages with a college student serving as a Capitol intern.

Diehl said he is stepping down both from his House speaker's position and from his elected job as a Republican representative from suburban St. Louis. Diehl's resignation is expected to become official Friday, when a successor can take over.

Diehl acknowledged "making a serious error in judgment by sending the text messages" to the intern, who no longer works at the Capitol.

"I'm going to do what's best for the (House) body and the (Republican) caucus, and step aside out of my office," Diehl said in an interview with The Associated Press and reporters from three other media outlets.

"I made a mistake," Diehl said. "It's one that calls into question my ability to lead."

His resignation announcement came a day after The Kansas City Star released a story accompanied by screenshots of what the newspaper said were electronic messages between Diehl and the intern. Some of the messages were sexually suggestive.

Former intern Katie Graham released a written statement after Diehl's resignation announcement thanking those who had reached out to her with support.

"This is extremely difficult for both families, and I hope everyone can begin the healing process," Graham said. "I strongly support the Missouri Capitol internship program, and hope it remains a positive experience for other students in the future."

Missouri Southern State University pulled Graham, a freshman, and its three other interns out of the Capitol this spring but has declined to go into details about the reason. Graham was an intern for another House member.

Diehl, 49, is an attorney who lives with his wife and three sons in the St. Louis suburb of Town and Country. He first was elected in 2008 and had been chosen by colleagues as speaker in January to preside over one of the largest Republican legislative majorities in state history. He's known for his ability to work deals and to persuade rank-and-file members to stick together on the party's priorities.

Republican House members met Thursday night and picked House Majority Leader Todd Richardson to succeed Diehl. Richardson is expected to be elected by the full House on Friday morning. Legislators face a 6 p.m. CDT Friday deadline to pass legislation this year.

"I'm incredibly honored by the outpouring from my caucus, especially during what's been a difficult few days," Richardson said. "The House plans to get back to work."

Diehl's resignation adds to a tumultuous year in Missouri politics. In February, State Auditor Tom Schweich, who was seeking the Republican nomination for governor, fatally shot himself after alleging a top GOP official was leading a smear campaign against him. A month later, Schweich's spokesman also died in a suicide.

Missouri Gov. Jay Nixon, a Democrat, described Diehl's resignation was "an appropriate and necessary step" and said he would work with the next speaker "to restore the public trust."

U.S. Sen. Roy Blunt, the top ranking Republican in Missouri, said Diehl "was an effective leader with significant accomplishments," but added, "He made the right decision today."

Democratic lawmakers had launched an effort to try to remove Diehl from the speakership. But Republicans had publicly continued to support him, and Diehl indicated Wednesday evening that he intended to remain as speaker. On Thursday, Diehl said none of the other 116 Republicans in the House had asked him to resign and he decided to do so after further evaluating the situation.

"I think, too often, we see politicians and people in the public eye, when they do something wrong, say they're sorry but not necessarily (be) willing to suffer the consequences of that," Diehl said.

He later added: "You can talk the talk or walk the walk. I made a mistake, I don't think it disqualifies me, but I think it certainly violates the high standards that I've set for myself and this body and this office, and I'm embarrassed by it. I'm sorry.

"I'm not going to put my friends in this caucus or my friends and loved ones back home through drama that was created by my mistake," Diehl said.

State Rep. Mark Parkinson, a Republican from St. Charles, provided the AP with a copy of a letter he wrote calling on Diehl to resign. He said it had been delivered to the speaker's office about an hour before Diehl's announcement.

"He made a mistake, he got caught and he's paid the price," Parkinson told the AP. "As soon as there's a new speaker elected ... the issue kind of goes away."

Some of Diehl's colleagues who had remained publicly loyal said Thursday that they also supported his choice to step down.

"I think he did the right thing," said state Rep. Kevin Engler, a Republican from Farmington. "I thought he did a good job as speaker, but sometimes you're not able to lead anymore, and I think John didn't want to get in the way of progress."