California universities will see funding increases next year -- but only if they enroll more in-state students.

With a midnight deadline approaching, California lawmakers approved a $122.5 billion state budget Wednesday. All three of the state’s public higher education systems will receive more funding. But for the University of California and California State University systems, parts of those increases come with a few conditions.

Over all, the UC system, which will get $3.3 billion from the state, will receive a $125.4 million increase. But to receive an additional $18.5 million, it will need to enroll 2,500 more California residents and place a cap on out-of-state enrollment. And while Cal State will receive a $148.3 million increase, it will need to enroll 5,194 more California residents to receive an additional $12.5 million.

Over the last few years, UC campuses have faced criticism for edging California students out. In response to tight budgets, the university system started admitting more out-of-state students -- who are willing to pay the higher price.

But since the number of out-of-state students began climbing, many have argued that the university system is no longer serving California residents effectively, and that qualified California students are being shut out of an affordable in-state education.

The strategy is common across the country, especially at institutions facing financial hardship: colleges will offer prices low enough to bring in out-of-state students, but still higher than the price of an in-state degree. Sometimes those ostensibly low prices will even match in-state tuition in nonresidents’ home states (“Go to UMaine for the in-state cost of UConn,” reads a billboard in Connecticut).

In March, a state auditor accused UC of lowering admissions standards for out-of-state students. The University of California has already moved to limit out-of-state enrollment at Berkeley, UCLA and UC San Diego, three campuses with high numbers of nonresident students. The California Assembly passed a bill this month capping the number of out-of-state students at UC, a move that Hillary Clinton endorsed. The bill has not yet passed the Senate.

But now, under the new budget, the university faces an even stronger incentive to change. To receive the extra $18.5 million, the Department of Finance will need to confirm by May 1, 2017, “that UC will increase residential enrollment by 2,500 students in the 2017-18 academic year and that the UC Board of Regents has adopted a policy capping nonresident student enrollment,” according to the Assembly Budget Committee floor report.

But the new budget never details what, exactly, that cap should look like.

“To be clear: the enrollment growth funding is contingent on the UC Board of Regents adopting a policy regarding nonresident undergraduate enrollment,” UC spokesman Steve Montiel told The Sacramento Bee. “The agreement does not dictate what form that policy must take.”

Over all, UC leaders have commended the new budget. “It provides critical new funding for important UC priorities, including research and innovation, outreach, academic support for students from disadvantaged backgrounds, diversity and enrollment,” a statement from the university said.

Dianne Klein, a university system spokeswoman, said that the system is grateful for the increase, but at the same time, the issue originated due to a decline in state funding. “We are fully aware that there needs to be the right balance,” she said. However, “if the revenue from the out-of-state enrollment goes away, we need to fill that gap somehow.”

While Cal State will also need to expand its in-state enrollment, the system hasn’t faced the same criticism as the UC system has for closing its doors on California residents.

“That is actually the majority of students that we serve,” said a Cal State spokeswoman, Elizabeth Chapin. “About 96 percent of students are from California.”

In a statement, Chancellor Timothy White praised the budget for supporting the system’s efforts “to expand opportunity, empower timely degree completion and close the achievement gap for low-income and underserved students.”

The new budget will also increase funding for California community colleges, a move that the community college system says will add 50,000 more seats and expand course offerings.

“Lawmakers are to be congratulated on passing a balanced budget,” California Community Colleges Interim Chancellor Erik Skinner said in a statement. Skinner also commended the $200 million that will be set aside to improve workforce training.