University of Oklahoma president David Boren announced Wednesday that he will retire at the end of the 2017-18 school year.

Boren, 76, has served as Oklahoma's president for 23 years. Before that he was a U.S. senator, and in the 1970s he became the youngest governor in Oklahoma history at age 33.

Boren said he will step down June 30, but that he has agreed to stay longer if a successor has not been selected by that time. He made the announcement during an address before a standing-room-only crowd of several hundred students, faculty and staff inside OU's performing arts center.

"Our faculty has never been stronger. Our students have never had more potential," Boren said. "I've always understood there would come a time when I would pass a baton to a new president. I believe the right time has come."

The search to replace Boren will be conducted by the OU Board of Regents, which is currently led by Clay Bennett, owner of the Oklahoma City Thunder.

Boren will retire as the second-longest-tenured president in university history, trailing only George Lynn Cross. As Oklahoma's president, Boren was at the heart of the Big 12's expansion push, which quickly fizzled after the league announced it would explore expansion in July 2016.

After two rounds of conference realignment took Colorado, Missouri, Nebraska and Texas A&M from the league, Boren famously called the Big 12 "psychologically disadvantaged," for being the smallest Power 5 league and the only one without a conference network or championship football game.

Thanks in part to his chiding, the Big 12 reinstated the championship game for this season.

A graduate of Yale University, Boren was a Rhodes Scholar who earned a master's degree from Oxford University and a law degree from the University of Oklahoma. He was elected governor in 1974 at the age of 33 and at the time was the youngest governor in the country.

Boren was hospitalized for about a week in March after undergoing heart bypass surgery.

"I've just had the normal decline of energy that anyone who is coming up on 77 has,'' Boren said, "but my bypass surgery was a complete success, and particularly in the last few months ... I have felt much stronger and much more like myself."