Former speaker of the Maine House Glenn Cummings will become the next president of the University of Southern Maine, filling a void left when the school’s first choice for the post said he couldn’t take the job because of upheaval at his current university.

Cummings will be the fourth president at USM since 2011, and takes over as the campus and the state’s university system continue to struggle with financial problems caused by declining enrollment, flat state funding and three years of tuition freezes.

Cummings replaces Harvey Kesselman, the system’s first choice for president, who was supposed to start work at USM on July 1. Kesselman said unforeseen circumstances at Stockton University, where he is now acting president, were behind his decision to stay in New Jersey.

Stockton’s president stepped down in April after two Atlantic City casinos blocked the school’s plan to open a campus in a shuttered casino on the boardwalk that the university had purchased for $18 million. A legal covenant with Trump Entertainment and Caesars Entertainment required that the building be operated as a casino hotel. That prompted a hearing by a legislative budget committee, a no-confidence vote by the faculty at Stockton University and the resignation of President Herman Saatkamp.

“While I eagerly anticipated being part of USM’s resurgence, the tremendous sense of obligation I have to Stockton University means I must forgo the opportunity to lead the University of Southern Maine,” Kesselman said Wednesday.

University of Maine System Chancellor James Page said Wednesday that he understood Kesselman’s decision.

Kesselman first notified Page two weeks ago that he might not take the job, and earlier this week the chairwoman of the Stockton University Board of Trustees sent Page a letter formally requesting that Kesselman be permitted to withdraw from his contract with USM.

“Harvey Kesselman’s long, capable service and dedication to Stockton University were among the qualities that made him such an appealing choice to join our leadership team in Maine,” Page said in a prepared statement. “While we sincerely enjoyed getting to know Dr. Kesselman and looked forward to working together, we respect his decision and admire his devotion to Stockton.”

Cummings referred to Kesselman’s decision and took a good-natured jab at Page in the process.

He noted that Page was presented two finalists for the USM presidency and opted not to choose Cummings. Then the “Creator intervened,” Cummings said, to reverse the chancellor’s decision. “I didn’t think that Creator would use a casino scandal.”

On Wednesday, Page described Cummings as a long-serving USM faculty member with longstanding ties to the state.

While interim president at UMaine-Augusta, Cummings helped lead a successful strategic plan and capital campaign, quickly developed an expedited bachelor’s degree program for displaced workers at the Verso paper mill in Bucksport, and strengthened the school’s veterinary technician degree program to provide Jackson Labs with the skilled workers it needed, Page said.

“I have every confidence President Cummings will be the leader to build on USM’s existing strengths and to realize the enormous potential and promise that is the University of Southern Maine,” Page said.

System officials decided not to reopen the presidential search because they thought the original search “was a resounding success in terms of community and campus engagement,” said system spokesman Dan Demeritt.

Cummings said Wednesday that he would strike a balance between developing better relationships with students and the community to attract students, and tackling difficult financial challenges.

“I appreciate all the nice-guy comments, but unfortunately the common welfare has to come first and is more important than anyone’s popularity. … We’re going to have to work hard to get ourselves fully out of the woods,” Cummings said during a news conference announcing he would fill the role as of July 1.

“Having said that, I think we’re in a good position as long as we’re moving forward to be able to make this university grow,” said Cummings, who will be paid $235,000 a year.

For several years, USM has made deep cuts to deal with multimillion-dollar budget deficits. Multiple protests and marches were held last year, including a brief takeover of a trustees meeting by students, when 51 faculty positions and five academic programs were eliminated in cost-cutting measures.

Cummings acknowledged those challenges Wednesday.

“The evidence is emerging that like a Maine spring, USM is slowly but beautifully surviving a dark Maine winter and it is going to get brighter and brighter,” Cummings said.

Cummings succeeds interim USM President David Flanagan, who was appointed to a one-year term in July, replacing Theodora Kalikow, who stepped down after two years as interim president. Kalikow came out of retirement to fill the position after Selma Botman stepped down amid faculty unrest.

The university system has had a string of top leadership changes at its seven campuses in recent years.

Currently, the system has only two permanent presidents, Kate Foster in Farmington and Linda Schott in Presque Isle, who were both hired in 2012. The other campuses have temporary presidents, serving terms of up to two years.

The leadership changes were cited in a February Standard & Poor’s report downgrading its long-term outlook for the system from stable to negative, citing declining enrollment and high turnover among leadership at the seven campuses. A lower credit rating would mean the system would have to pay higher interest rates on future borrowing.

Faculty leaders said they were happy about the choice of Cummings, who before joining the system was president and executive director of Good Will-Hinckley and the Maine Academy of Natural Sciences in Hinckley, one of the first charter schools in the state.

The head of the USM Faculty Senate said Cummings brings “educational experience and leadership at every level.”

“The time Glenn has spent in classrooms in Maine high schools, community colleges and right here at USM will be very valuable as we work together to attract and retain the students we are committed to serve. On behalf of the faculty, I congratulate President Cummings on his new job and offer assurances that we are ready to get to work on USM’s future,” Faculty Senate Chairman and music professor Dr. Thomas Parchman said in a prepared statement.

“Glenn Cummings will be a great leader for USM,” said Susan Fiener, economics professor and president of the USM chapter of the Associated Faculties of the University of Maine System.

Portland Mayor Michael Brennan said Cummings would be a strong advocate for creating an educational partnership between USM and Portland, and would help transform the public education system in the state’s largest city.

“Today (Cummings) is accepting responsibility for current students at USM, but also for the next generation of Maine students and for the next generation of Maine citizens,” Brennan said.

State political leaders also praised the choice.

“Students and faculty alike have a champion in Glenn. He has the skills and relationships to take USM to its full potential,” Senate Democratic Leader Justin Alfond of Portland said in a prepared statement.

House Republican Leader Ken Fredette of Newport cited Cummings’ work at Good Will-Hinckley.

“As a USM graduate, it is my hope that this appointment will lead to stability and continue to build upon USM’s growing reputation and potential for a great urban campus,” Fredette said in a prepared statement.

Marpheen Chann-Berry, a student at the UMaine School of Law, said Cummings was a promising choice, given his background as a former state legislator and an official at the U.S. Department of Education.

“I hope that he goes beyond simply ‘managing’ USM and uses his experience to be an advocate, not only for USM, but for the surrounding communities, towns and cities that are impacted by what happens at USM,” Chann-Berry said in an email.

Staff Writer David Hench contributed to this report.