As Bay Area university students and professors struggle to find housing near their campuses, plans to build more homes at UC Santa Cruz and UC Berkeley are facing courtroom challenges that threaten to bog down the projects in delays.

UC Santa Cruz is squaring off against two environmental groups that have sued over the school’s plans to build new residences for 3,000 students who often are left out of on-campus housing — juniors, seniors, graduate students, and students with families. Meanwhile, a plan to build 150 homes for UC Berkeley professors and grad students, which passed a preliminary vote Wednesday, is facing a potential lawsuit from city officials. Now both universities, which are grappling with growing enrollments and housing shortages, are gearing up to fight for plans that they see as crucial to their continued success.

“This is a near existential problem for the campus when it comes to our ability to continue recruiting and retaining the best faculty that there are out there,” said UC Berkeley spokesman Dan Mogulof.

Universities across the Bay Area are scrambling to house students and professors who can’t afford the region’s high prices. This week the San Jose City Council endorsed Santa Clara University’s proposal to build a 290-unit apartment complex for faculty and staff, despite controversy over the lot’s zoning. Stanford has proposed adding 3,150 housing units over the next 16 years, but negotiations with Santa Clara County stalled in April.

And UC Berkeley is planning to turn People’s Park into student housing, sparking backlash from some activists who want to preserve the iconic park and its history as a hotspot for political protests.

At UC Santa Cruz, the housing need is so great that the school last summer implored faculty to open rooms in their homes to incoming students.

Panna Mori, who will be starting school there this fall, has been searching for housing for two months. Mori, a junior majoring in history, is transferring to UC Santa Cruz from Cabrillo College in Aptos.

“The search has been incredibly frustrating,” Mori wrote in an online message. “Everything is wildly expensive and there is so much competition.”

The pressure is building — Mori, who uses gender-neutral pronouns, will be evicted from their current house in Santa Cruz at the end of the month so the landlord can sell the property.

To help students like Mori, UC Santa Cruz wants to build new housing as part of a project dubbed Student Housing West, spread across two sites. The bulk of the housing — about 2,900 beds for upperclassmen and grad students — would be on the campus’ west side, replacing existing housing for students living with children and partners. But before that can happen, the school must build new housing for those students with families. The university wants to do it in the East Meadow, an undeveloped open space on campus, where the school has proposed building 140 new housing units.

That proposal sparked an immediate backlash.

“The East Meadow is iconic — it’s the gateway to the university. You come onto the campus through the main entrance and you have this wide expanse of open meadow,” said attorney William Parkin, who, on behalf of the East Meadow Action Committee, has sued to block the project under the California Environmental Quality Act.

The university needs the Student Housing West project, said spokesman Scott Hernandez-Jason.

“The need for student housing is so significant and so great,” Hernandez-Jason said, “that the decision to build in the meadow, while not an easy one, is the best one for this project.”

In Berkeley, a recent university-affiliated working group found that to successfully recruit and retain professors, the school needs between 260 and 390 homes for new faculty. The school is falling far short. It has about 26 homes in the neighborhoods around campus.

UC Berkeley has proposed a five-story residential project to house newly hired, non-tenured professors and grad students at the corner of La Loma and Hearst avenues. Last month, the Berkeley City Council gave the city attorney approval to initiate a lawsuit against the school over the project, dubbed the Upper Hearst Development, which also includes a new academic building.

It wasn’t the housing that rankled city officials. It was the overall impact of the university — a massive institution that floods Berkeley with thousands of students each year, costing the city in transportation, police and fire services and taking already scarce housing units off the market. Serving the UC Berkeley population cost the city $21 million last year, up from $11 million in 2003, according to the city.

“We believe the university needs to plan, prepare and mitigate for the impacts of massive population growth,” said city spokesman Matthai Chakko.

The UC Regents finance committee approved the Upper Hearst Development on Wednesday, and the project was set to go before the entire Regents for another vote Thursday. UC Berkeley Chancellor Carol Christ on Tuesday announced she will form a working group to conduct a cost-benefit analysis of the project.

For recently hired professors like Elizabeth Linos, who rents a condo in North Oakland and commutes to teach public policy at UC Berkeley, the Upper Hearst housing could make a big difference.

“If it weren’t for the housing challenge, Berkeley would be the ideal school for anyone at my level,” she said. “And because of the housing challenge, I have to think twice about whether or not I can stay here.”