1 of 9
Missouri House Speaker John Diehl makes a brief speech before stepping down from the dais after addressing the body for the final time, Friday, May 15, 2015, in Jefferson City, Mo. Soon after leaving the chamber, Diehl, who has acknowledging he exchanged sexually suggestive text messages with a Capitol intern, delivered his resignation letter to the House clerk.

JEFFERSON CITY, Mo. — Missouri House Speaker John Diehl led colleagues in the Pledge of Allegiance, apologized again for exchanging sexually suggestive text messages with a Capitol intern, then walked out of the chamber and resigned Friday as Missouri lawmakers sought to put his scandal behind them on the final day of the session.

Moments after Diehl departed, the House unanimously elected Majority Leader Todd Richardson to succeed him as speaker.

Diehl's farewell suggested that he hopes he won't be remembered for his indiscretions, as he noted that pictures are not painted "with a single color."

"It's a little more complicated than that, and it's a little more detailed," Diehl said. "I hope someday when I'm forgiven for my mistakes that my picture, my portrait is more complete."

His goodbye was met by a standing ovation by some, while others refused to rise from their seats. Some representatives cried.

Shortly thereafter, Richardson took the oath of office with his hand on a Bible held by his wife.

"I cannot express to you what an honor it is to be in this position and how humbled I am by the awesome responsibility of the task before us," said Richardson, of Poplar Bluff.

Diehl's resignation came after The Kansas City Star released a story this week accompanied by screenshots of what the newspaper said were electronic messages between Diehl and the intern, some of which were sexually suggestive. He acknowledged "making a serious error in judgment by sending the text messages" to the intern, who no longer works at the Capitol.

His stepping down 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.

Republican Rep. Sonya Anderson of Springfield called Richardson "the definition of integrity" as she called on members to vote for him. Republicans — who hold an overwhelming majority in the House — picked him for the position during a private meeting Thursday night.

Richardson's father watched from the chamber as his son was sworn in. Mark Richardson, a former circuit court judge, served as the GOP's House minority leader in the 1990s before he resigned from the leadership post after pleading guilty to drunken driving.

Todd Richardson said he hopes to get the House back on track in the last few hours before the 6 p.m. deadline to pass bills this session. Afterward, he said, his focus will turn to reviewing the House's intern policies and repairing the image of the Legislature as a whole.

"I don't think the last five months have put the Legislature and this public institution in a particularly good light," Richardson said Thursday. "It's my great hope that beginning (Friday) we can get back to work and focus on improving that public perception."

Associated Press writer David. A. Lieb contributed to this report. Follow Summer Ballentine at https://twitter.com/esballentine