The friend said that about 30 seconds passed between the police’s approaching Mr. Tillman and the shooting. He said he did not hear officers give Mr. Tillman any warnings before they fired at him from about 10 feet away. The friend had ducked behind a car door.

Image A Hi-Point handgun recovered by the police after a shooting in South Ozone Park, Queens, on Sunday. Credit... New York Police Department

“I felt like I was in a movie,” he said. “It was unreal and it happened so fast.”

Then he heard a gut-wrenching yell from Mr. Tillman’s wife. He said she ran toward her husband, who was lying in the street. Officers held her back.

“She was screaming, ‘Oh no, please, please God, no,’” the friend said.

Mr. Tillman was pronounced dead at Jamaica Hospital Medical Center. The officers were not hurt, but they were taken to Long Island Jewish Medical Center for evaluation. The police did not release their names. They were all assigned to the 106th Precinct.

Officers recovered a Hi-Point .40-caliber firearm at the scene, the police said.

Neighbors poured out of their homes, many of them puzzled by the chaos in what they described as a typically quiet neighborhood. One woman screamed about having video cameras that captured the shooting, said a neighbor, Eric Machicote.

Evidence markers dotted the pavement on 135th Street. Just behind Mr. Tillman’s S.U.V., a gray Ford sedan appeared to have stopped mid-drive.

Anthony Seegobin, 26, who lives near 135th Street and 116th Avenue, said he initially thought the gunshots had come from an action movie he was watching, and then possibly from cars backfiring outside. Only when ambulances arrived and he saw shell casings was he sure that someone had been shot — a sign, he said, of how safe people feel in the area.

Mr. Seegobin’s sister and her husband, who were in the basement, told him they heard an officer yell, “Get down,” and then, after a couple of seconds, three or four gunshots.