The city's latest attempt to comply with state housing law appears to have been rejected by Encinitas voters Tuesday, though not as soundly as the previous proposal was two years ago, unofficial election results indicate.

Regardless, Encinitas still lacks a voter-approved, state-mandated housing plan after years of failed attempts and city officials expect to be back in court next week fighting two lawsuits, which seek to force the city to finally comply with state law.

"We'll see what (the judge) says," Mayor Catherine Blakespear said Wednesday morning. "We put two years of effort into this plan ... where we go from here I don't know .... The city is not going to be given a pass to comply with state law indefinitely."

Encinitas is the only city in San Diego County and one of just a few in the state that doesn't have a current Housing Element -- a state-required document that spells out how a city proposes to accommodate its future housing needs, particularly those of low-income residents.

The new ballot measure, known as the Measure U plan, sought to bring Encinitas into compliance with state law by up-zoning 15 privately owned properties, so they could accommodate multi-family housing developments. The zoning change would have allowed the owners to exceed city height limits and put 25 to 30 housing units an acre on their properties.

Unofficial election results put the Measure U no vote at 52.91 percent. That's a bit less than the 55.92 percent who opposed the Measure T plan two years ago.

However, this drop is likely due to the low-key nature of the opposition campaign this time around and definitely not because the new plan is any better than the old one, Peter Stern, one of the leaders of the opposition said Wednesday as he reviewed the results.

"I think we probably prevailed because the policy was so bad and people saw through it," he said.

It definitely wasn't due to tons of campaign signs being posted around town or mailers from him and his fellow opponents, he added. They had an "entirely grassroots" campaign this time, Stern said, adding that they made their own campaign signs and didn't send any mailers. He probably did more campaigning than anybody -- he sent out about 3,000 emails, he said.

Richard Boger, one of the proponents for the ballot measure, said he was saddened by Tuesday's results.

"I'm disappointed and I'm disappointed that more of the public didn't see the value of this and rally behind this," he said.

Boger said it's hard to compare the new plan and the old one because state requirements changed while the new one was being produced, so different sites had to be included in it. The new plan may not have been perfect, but city officials did what they could within the rules they had to follow, he said.

After the city's previous attempt -- the Measure T plan -- failed to win voter approval in 2016, the Building Industry Association of San Diego County and the housing advocacy group San Diego Tenants United filed lawsuits against the city.

In April, a Superior Court judge held off on making a ruling in those cases, saying he wanted Encinitas voters to have their say on the new plan in November. However, the judge said, if the measure failed, the plaintiffs will be justified in asking how much time is enough to get the job done.

Blakespear said Wednesday that she doesn't think the court will impose a plan on the city, but it could set a timeline to get the job done, say 120 days. If the city doesn't met the deadline, the court could prevent it from issuing building permits for new projects until the state requirement is met.

Opponents have noted that no California city has yet faced such a court order, and they say the city simply needs to do a better job of crafting a plan that can meet state requirements while satisfying voters' desires.

Stern said he wants a plan that guarantees 20 percent of the new housing will be set aside for low-income people, that the proposed housing sites are spread evenly across the city, and that those sites are "tenderly placed so as not to exacerbate already challenging traffic situations."

For her part, Blakespear said the new plan was the city's best attempt to state standards while trying to accommodate residents' concerns about increasing the city's housing density. The new plan had lower building height limits and other accommodations to make it more palatable to residents than the old Measure T plan.

"I think we pushed the envelope (of the state requirements) as far as possible," she said.