SAN FRANCISCO — The University of California Board of Regents approved its first ever enrollment cap on nonresident undergraduates, heeding calls from the public to reserve more spots at its campuses for students from around the state.

The board also vowed Thursday to implement recommendations to improve the budgeting practices of the president’s office following a stinging state audit even as they defended President Janet Napolitano.

The enrollment cap will be 18 percent at most campuses with UC Berkeley and UCLA among the campuses given greater leeway. Nearly one in four undergraduates at UC Berkeley is from another state or country.

A state audit delivered last year found that UC had admitted a growing number of nonresident students, some of whom were less qualified than in-state students, at the expense of residents.

Nonresidents pay nearly $39,000 in tuition and fees, considerably more than the $12,300 paid by resident undergraduates. The amount will top $40,000 after a planned hike in tuition and fees goes into effect this fall.

Regent George Kieffer, a product of the 10-campus University of California system, said Thursday that he didn’t want to cap out-of-state enrollment at campuses that could benefit from an influx of out-of-state tuition.

“On the other hand, I think we have to listen to the public, and how they feel about things,” he said. “There’s a balance in keeping faith with the public.”

Much of Thursday’s meeting was taken up with a current audit so scathing that it drew bipartisan legislative ire and prompted California Gov. Jerry Brown to withhold $50 million from the UC system’s budget to “hold their feet to the fire.”

Auditor Elaine Howle said Thursday that UC administrators failed to disclose $175 million it had saved by spending less than budgeted and requesting increases based on previous years’ overestimated budgets.

She said she meant no disrespect to Napolitano, a former U.S. secretary of Homeland Security, but her job was to survey budgeting process and practices.

“And the Office of the President is not doing a good job,” she said.

Napolitano disputed findings that her office hid $175 million and said much of the money is committed to system-wide university programs, leaving a much smaller amount —about $38 million— in reserve for unexpected expenses.

Still, she and the board committed to implementing the audit’s 33 recommendations to improve transparency and spell out policy. Given the uproar over the audit, the board also declined Thursday to approve 2017-18 budget requests as-is for the president’s office until regents had more time to study the requests.

Some board members complained about poor press coverage, and thanked the auditor for clarifying that the president’s office did not commit malfeasance.

“I was delighted when I found out we had the possibility of Janet Napolitano as our president. I’m still delighted. She has a record of being someone of great character who is visionary and gets things done,” Regent Norman J. Pattiz said to Howle.

“I think, frankly, you lucked out that the president agreed to all of them.”

The meeting failed to draw noisy protesters who temporarily shut down the board meeting on Wednesday, upset by audit findings.

The enrollment cap means that the system will receive $18.5 million state lawmakers had held back pending the adoption of a nonresident policy.

Hadi Makarechian was one of two regents to vote against the cap, saying that the University of California should not build walls to keep students out. Gareth Elliott said he voted against the proposal because he didn’t want to reserve nearly 25 percent of spots for nonresidents at UC Berkeley.

Besides UC Berkeley, campuses that currently exceed the 18 percent cap will be allowed a higher cap pegged to next year’s enrollment. Those campuses are UC San Diego and UCLA at 23 percent; and UC Irvine at 19 percent.