SUNNYVALE — When hundreds of teenagers descended upon a Sunnyvale home where 18-year-old Elias Elhania was shot and killed last week, the event violated just about every rule the city has for short-term rentals.

The single-story home in quiet Raynor Park wasn’t registered with the city. The owner wasn’t there. And instead of the maximum four adults allowed under Sunnyvale’s short-term rental rules, at least 150 people showed up for a night billed on Instagram as “Turn Up Pt. 2.”

The incident  — which comes less than two years after a mass shooting killed five young people at an Orinda Airbnb on Halloween — joins a growing list of shootings at short-term rentals nationwide. The apparent ease with which the party occurred underscores the challenges cities and home rental companies face in trying to regulate short-term rentals. But it also raises questions about whether any of the key players is doing enough to stop house parties before they occur — or turn deadly.

“Where is the responsibility here?” said Brian Aday, a professor with San Francisco State University’s hospitality and tourism management department. “Yes, Airbnb has a responsibility. Yes, the city and homeowners have the responsibility. Who enforces them and where do those boundaries lie?”

The trouble is, no one’s entirely clear. Like many other cities, Sunnyvale requires Airbnb hosts to register with the city planning department and pay a yearly tax. In addition, bookings are limited to four guests, and hosts are required to be on-site at rentals. But the ordinance is not proactively enforced, and rentals on the Airbnb platform are not regularly cross-checked with the city’s list of registered homes, Sunnyvale Director of Public Safety Phan Ngo said.

Seventy-six properties are registered with the city, Ngo said. The house on Navarro Drive, where shots broke out Aug. 7, was not one of them. Airbnb has said the party was thrown without the host’s consent. It’s not clear who booked the property.

“What recently happened in the city of Sunnyvale highlights the issues most cities are facing — you have somebody operating their home as a short-term rental, they have it on a platform, but they’re not registered with the city — and unfortunately the homicide occurs and we’re made aware of the situation,” Ngo said.

Since 2016, the city has investigated nearly 100 homes as potential illegal short-term rentals after neighbors complained about noise or cars constantly coming and going. In most of those cases, Ngo said, the city sent a letter asking the homeowner to comply with the ordinance.

But residents believe the city could do more.

“It’s a systematic failure at all levels,” said Murali Srinivasan, 60, president of the adjacent Ortega Park Neighborhood Association who lives within walking distance from the shooting. “It was preventable. That’s why I am so angry.”

Without comparing listings on rental platforms with the city’s list of registered homes, the city has no way of knowing how many rentals may be operating without permits. It also does not perform spot checks on registered rentals because “it’s not practical” given staffing constraints, Ngo said.

It’s not even clear from Airbnb’s site how many listings it has in the Sunnyvale area — depending on search terms, anywhere from 30 to 300 homes show up. The company does not share its list of local rentals with the city, Ngo said.

Airbnb has previously fought hard against local regulation of its business, including suing the city of San Francisco — where the company is headquartered — over a rule to fine short-term rental platforms for unregistered listings. Since settling that case with the city in 2017, however, Airbnb now takes steps to enforce local regulations in larger markets, including removing unregistered homes from the platform.

But smaller cities are often left on their own. Following the 2019 mass shooting in Orinda — which also took place at an unregistered rental — the city hired a third-party company that reviews listings on Airbnb and cross-checks them with registered hosts, Mayor Amy Worth said.

Since then, 38 homes have been identified for infractions like expired or nonexistent permits. The city mandates that Airbnb remove those listings within five days, a rule the company has complied with, Worth said.

“If they’re not going to enforce the agreement with us, we’re kind of stuck,” said Worth. “Getting them to comply quickly is really key. You want the problem solved now.”

After the Orinda shooting, CEO Brian Chesky said the company was banning party houses and “redoubling our efforts to combat unauthorized parties and get rid of abusive host and guest conduct.”

“We must do better, and we will. This is unacceptable,” Chesky posted on Twitter.

Airbnb announced a raft of policy changes including expanded manual screening of “high-risk” reservations, and a hotline for neighbors to call when they suspect parties are being held at nearby Airbnbs. The platform also banned people under 25 with fewer than three positive reviews from booking entire homes, but only in their local area.

Despite those changes, violence at party houses has continued to plague platforms such as Airbnb. While there is no comprehensive data about crime at short-term rental homes, a review of news reports showed that in the past two years, more than 100 shootings have occurred at short-term rental properties in the United States and Canada. At least four were in Northern California, including a July shooting in Monterey County that killed three people and another last year in Sacramento that injured three.

Airbnb spokesperson Ben Breit did not answer questions about how the company has enforced policies banning party houses, including how many employees are assigned to manually review bookings and how suspicious bookings are flagged. Since the Orinda shooting, the company has sued some renters who host unauthorized parties, including in the Sacramento shooting.

“Airbnb bans parties, and we condemn the senseless gun violence that took place in Sunnyvale,” Breit said in a statement, adding that the company is working with Sunnyvale police on their investigation.

But unlike traditional hotels, which typically have one front guest entrance visible to staff and on-site security, Airbnb does not have a built-in mechanism to deter guests determined to party, said Aday.

Sunnyvale plans to review its short-term rules at a city session scheduled for Sept. 14, but Ngo said it is premature to speculate on how the city may change its rules in the wake of the shooting.

But neighbors have continued to express their anger, including in hundreds of posts on Nextdoor, said Srinivasan. Simply removing the Navarro Drive house from the platform, he said, isn’t enough.

“In my opinion, that’s putting a Bandaid on cancer,” he said. “Just because you delisted this owner, what happens to the next one? The same thing could happen anywhere else.”