More than 70,000 elevators operate in New York City, and elevator deaths and injuries are rare. Still, these infrequent tragedies have prompted officials to address a deadly common thread — door malfunctions.

“Elevators are the safest form of travel in New York due to the city’s stringent inspection and safety requirements,” Abigail Kunitz, a spokeswoman at the city’s Buildings Department, said in a statement.

Accidents are rare, but horrific

In the past two years, two workers were killed by passenger elevators, according to city data. Mr. Waisbren is the first passenger to have been killed since 2016. (The city separates passenger and commercial elevator data.)

In an accident similar to yesterday’s tragedy, a woman named Suzanne Hart was killed in 2011 when an elevator lurched after she placed one foot inside its door. The elevator, in a Midtown office building, dragged Ms. Hart, 41, and pinned her between the walls.

Ms. Hart’s death prompted the Buildings Department to require that all elevators in the city have door-lock systems — which prevent elevators from moving if doors are not properly closed — installed or upgraded by Jan. 1, 2020.

Buildings that do not meet the deadline will be subject to noncompliance fines, officials said.

Last January, a woman was trapped for three days in the elevator in the townhouse on the Upper East Side where she worked, while the house’s owners spent a weekend away.

Firefighters eventually forced open the doors of the elevator, which was stuck between the house’s second and third floors.