Ben Sasse, the president of the University of Florida and a former Republican senator from Nebraska, announced Thursday that he was resigning his position so he could dedicate more time and attention to his ailing wife.

Dr. Sasse, 52, took office in early February 2023. His resignation will be effective July 31. Mori Hosseini, the chair of the university’s board of trustees, said in a separate announcement that the board would work quickly to appoint an interim president and would begin the search for a new president.

In a long and heartfelt message on X, Dr. Sasse said that his wife, Melissa, who had an aneurysm and a series of strokes in 2007, was in recent months diagnosed with epilepsy and had been “struggling with a new batch of memory issues.”

Although his two daughters are in college, his son is just turning 13, he said in the post.

“I’ve got two spectacular callings in life right now: First, I’m a husband and dad,” Dr. Sasse wrote. “Second, I’ve been blessed to serve as president of the best dang public university in America — Go Gators! — and I’ve loved the challenge of giving this university everything I’ve got. But here’s the bottom line: Those callings are significantly at odds with each other right now.”

Dr. Sasse said that his family would continue living in Gainesville, Fla., and that he would remain as president emeritus and as a professor continuing to teach classes.

Of his students and colleagues, he said, “You touched our hearts and made this more than a job — you made it our community. That’s why we’re not going anywhere.”