SAN JOSE — After an anchoring Nob Hill grocery store closed in a prominent shopping center two years ago, the owners of a Chinese restaurant a few doors down hoped a new retailer would jump right in.

It hasn’t happened. The former supermarket building at 7076 Santa Teresa Boulevard has sat empty. And instead of drawing hungry shoppers, it gathers trash and a pesky new tenant — rats.

“We don’t want them to travel here,” said Tom Phung, co-owner of Golden House Restaurant.

Empty retail space is nothing new as stores come and go. But the situation at the former Nob Hill building is unusual — and alarming to neighbors — because the supermarket chain continues to lease the space until 2021 with no immediate plans to fill it. There’s at least one other similar situation in the city with a former supermarket sitting empty for years. City officials are now considering legislation that could limit how long lease-holders can leave the space vacant.

“The community feels like they’re being held hostage by these corporations,” said City Councilman Sergio Jimenez, who represents the district and is considering a measure that could curb similar situations. “You’ve got this vacant building where there is no commerce happening and people don’t have a grocery store simply because of their bottom lines — their profit.”

Jimenez is pushing hard to get a new retailer in there — but he can’t force the property manager, Retail Opportunity Investments Corp. or ROIC, to terminate Nob Hill’s lease — creating frustration among neighbors and sparking a fight over private property rights versus the public interest.

Community leaders speculate retailers purposely kept the buildings vacant to thwart competition against their nearby stores. Nob Hill, for example, has another store 3 1/2 miles away on Snell Avenue.

But Chelsea Minor, a spokeswoman for Raley’s — Nob Hill’s parent company — says that’s not the case. She said the Santa Teresa store closed in 2015 because of declining sales and increasing competition.

Minor acknowledged the community’s concerns, and said “it’s not typical” for Nob Hill to maintain a lease when the store is gone. In this case, Minor said, the grocer in 2015 extended the lease by five years hoping to open a distribution center there. That plan didn’t pan out.

Like our Facebook page for more conversation and news coverage from the Bay Area and beyond.

Now it’s turned into finger-pointing: Minor says Nob Hill offered ROIC a chance to sublease the space — but they haven’t heard from their landlord since May. Top ROIC officials say the grocer refuses to give up the lease or let anyone else move in.

“Keeping an empty lease is not our normal business protocol. It happened and we want to make sure we do right by the community,” Minor said. “We have offered to ROIC to sublease the space. We have given keys and full access to the building.”

ROIC’s CEO Stuart Tanz said Raley’s won’t surrender the lease because it doesn’t want competition. ROIC has tried to find another tenant, Tanz said.

“Raley’s, in my humble opinion, won’t surrender the lease because they don’t want another grocer there,” Tanz said. “They’re trying to protect market share. They won’t give the location back to us or put any effort into subleasing the building because they don’t want competition to come in.”

Tanz added that his company had no choice but to renew Nob Hill’s lease — it was an automatic option — and that the grocer “has demanded a large sum of money to relinquish the lease back to us.”

Even more alarming: The grocery chain can renew its lease again until 2026, according to ROIC.

Minor declined comment on “private real estate negotiations,” but said Nob Hill would be open to subleasing to another grocer.

As the two companies battle it out, Jimenez said the community loses.

Get top headlines in your inbox every afternoon.

Sign up for the free PM Report newsletter.

“As a community, we don’t know what to believe,” said Deirdre Wyness, 41, a high school teacher who’s lived in the area for a decade. “It’s all corporate greed. We’re pissed and we’re not going to let this stay dormant.”

Not far from the prestigious Valley Fair and Santana Row, an empty Safeway store on the corner of Payne Avenue and Winchester Boulevard also sits dark. Councilman Chappie Jones said the store closed a few years ago after another Safeway opened about a mile away in Campbell. The community wants another grocery store, he said, but Safeway still holds the lease.

“It’s frustrating — Safeway has the lease and they’re just keeping the space vacant,” Jones said. “And the landlord can’t do anything in terms of making Safeway open a store as long as they’re paying rent. It’s attracted blight infused with homelessness, trash and illegal dumping.”

Safeway spokeswoman Wendy Gutshall declined to answer questions about the lease, and said only that the company has a “robust pipeline of new stores” coming. The property manager, Regency Centers, did not respond to requests for comment.

Peter Liebow, a shareholder at Creech, Liebow & Roth who specializes in real estate law, said the situation sounds unusual. Liebow hasn’t seen the Safeway and Nob Hill contracts, but said most commercial leases allow termination if the tenant leaves it vacant for too long.

“It’s difficult for me to believe that the property owner has no recourse,” Liebow said. “Normally abandonment is a ground for termination.”

Community pressure, including the threat of picketing at the Nob Hill on Snell Avenue, has brought some improvements. The rats were exterminated and ROIC increased security patrols at the shopping center. City code enforcement officials paid a visit but found no violations.

“This finger-pointing back and forth needs to stop,” said Issa Ajlouny, who’s lived in the area for 33 years. “If they care about the community, both ROIC and Nob Hill need to come together and fix this problem and get a grocery store in there again.”