Police officers shot and killed a Bronx man in the lobby of a building housing formerly homeless New Yorkers on Monday night after he stabbed two women who work as security guards there, the authorities said.

The security guards were in serious condition at St. Barnabas Hospital but were expected to survive, a law enforcement official said.

The man, Cornell Lockhart, has been a resident of the supportive-housing building since 2011, said Frederick Shack, the chief executive of Urban Pathways, which runs the complex.

After Mr. Lockhart began swinging the knife and stabbing the guards in the lobby of 1974 Hughes Avenue, in the Tremont neighborhood, uniformed officers from the 48th Precinct responded to 911 calls around 7:45 p.m.

Mr. Shack said the attack appeared to be unprovoked. One guard was stabbed in the left arm, and the other in the chest and an arm, Chief Terence A. Monahan, the chief of patrol for the New York Police Department, said at a news conference late Monday night.

Mr. Lockhart was holding a steak knife, Chief Monahan said.

Chief Monahan said that officers told Mr. Lockhart more than 20 times to drop the knife but that he did not.

Instead, Mr. Lockhart “stepped toward the officers with the knife displayed in his right hand,” Chief Monahan said.

Image

A knife that the police said was used in the stabbing.CreditNew York Police Department

Mr. Lockhart had a history of psychiatric illness, and though he had had arguments with other residents, none of them turned serious, Mr. Shack said in an interview. Mr. Lockhart had been a client of Urban Pathways since 2009. His age was not released, nor were the names of the guards.

The officers did not have Taser stun guns, weapons that the Police Department has provided additional officers with recently as alternatives to their firearms. That led onlookers at the news conference to yell out to police officials, “Why didn’t you tase him?”

Chief Monahan said that the officers were wearing body cameras and that investigators would review the footage. Investigators had already reviewed security camera footage from the lobby of the stabbing, Chief Monahan said.

The police released a picture late Monday of the bloodied knife that officials said Mr. Lockhart had used.

The supportive-housing building is a two-story brick complex known as the Hughes House. Chief Monahan said the complex received referrals from jails and hospitals for people in need of a place to stay.

Urban Pathways says it helps find housing each year for more than 2,000 New Yorkers.

Maria Perez, 54, who said she had lived in the neighborhood for two years, said Mr. Lockhart was known to beg for change.

“I didn’t think that old man would do something like that,” she said. “He was harmless.”

A version of this article appears in print on , on Page A24 of the New York edition with the headline: Man Stabs 2 and Is Fatally Shot by Police. Order Reprints | Today’s Paper | Subscribe