This month’s announcement of a 5 percent tuition increase in the fall at Maryland public colleges and universities, coming a few months after a 2 percent mid-academic-year hike, was not good news for thousands of students and their families.

But, sadly, it is not surprising. It was an inevitable outcome of an all-too-frequent story.

This tale demonstrates the roller-coaster nature of state higher education funding in Maryland and nationally and the resulting financial whiplash suffered by students and their families.

The foundation for this fall’s tuition increase was laid in January, when then-Gov. Martin O’Malley (D), in his final days in office, ordered major spending cuts in an effort to remedy a $750 million gap in the state’s budget. That included an immediate $40 million reduction in funding for the University System of Maryland, with nearly $16 million cut from the University of Maryland, the state’s flagship institution in College Park.

The immediate result: a midyear, 2 percent tuition increase.

Gov. Larry Hogan (R) restored some of the money, but it was not enough to stave off the need to raise tuition again.

The bottom line: Students at Maryland’s public colleges and universities are facing a 7 percent tuition hike this calendar year.

Ironically, O’Malley came into office promising to boost state higher education funding and hold down tuition increases — and he and the state legislature made good on that promise for nearly a decade.

It was an explicit bargain that benefited students and their families: The state maintained a robust investment in higher education, and the state’s colleges and universities identified operating efficiencies and held down their spending.

The result was a freeze on tuition increases from fiscal 2007 to 2010 and four years of only 3-plus percent annual increases. That increase was lower than the rate of inflation. It was also the lowest tuition increase rate in the nation.

But all this was accomplished in the aftermath of severe cuts in state funding of higher education from 2002 to 2006. The result: Tuition skyrocketed by 45 percent in those years alone, roughly 11 percent per year, the fastest increase nationwide.

Nobody wants a large tuition increase, and nobody wants another period of rapid increases similar to that at the start of the century.

But that is the result of state budget cuts: another steep ride up the tuition roller coaster.

Maryland is not unique. State disinvestment in higher education is an ongoing, national problem.

The New York think tank Demos reported May 5 that in the past decade the average tuition at a public, four-year university nationwide has risen by nearly $3,000.

The primary driver of rising tuition? Declining state spending on higher education.

According to Demos, that alone was responsible for nearly 80 percent of tuition hikes at public colleges and universities between 2001 and 2011.

As the report’s author, Robert Hiltonsmith, told Inside Higher Ed, state higher education cuts leave colleges with few options. “If there isn’t a lot of fat to cut, then their only option is to raise tuition or lose quality of education,” Hiltonsmith said.

Public-sector tuition increases directly affect the vast majority of college students, since about 80 percent attend public institutions. And it is the vise gripping Maryland’s public colleges and universities heading into the 2015-2016 academic year.

So, for anyone to say they were surprised when the University System of Maryland Board of Regents announced that 5 percent tuition increase is akin to Capt. Renault’s proclamation in the movie “Casablanca” that he was “shocked” to discover that gambling was going on at Rick’s club as he pocketed his winnings.

A sizable tuition increase following a large state cut in higher education spending? Regrettably, there is nothing shocking to report. It is just the sad reality of how higher education funding works.

But it does not have to be this way. There is a choice.

If states make the needed investments in their public colleges and universities, the result will be more affordable, accessible higher education.

The writer is president of the American Council on Education.