A man whose mother called the police to report that he was acting erratically was fatally shot on Monday by one of the police officers who responded to the family’s apartment in Brooklyn, the police said.

The man, Dwayne Jeune, 32, was shot after he advanced on the officers with “a large carving knife” in the apartment, after two shocks from a stun gun failed to subdue him, Terence A. Monahan, chief of patrol, said at a news conference at the apartment complex.

“This incident unraveled in seconds,” Chief Monahan said. He cautioned that the information was preliminary and that the department’s initial account was “subject to change” as the investigation continued.

The mother called 911 around 12:20 p.m., saying that Mr. Jeune was acting erratically though not violently, the police said. Four officers went to the family’s fifth-floor apartment at 1370 New York Avenue in East Flatbush, knocked and were admitted by the woman, Chief Monahan said.

The police had been to the apartment before to help Mr. Jeune, but this time, the officers encountered him holding a knife, the chief said. One of the officers fired two darts from a Taser stun gun, striking Mr. Jeune in the chest and arm as he approached the officers with the knife. When that did not stop him, another officer opened fire, Chief Monahan said.

Mr. Jeune was struck in the chest, but the chief did not say how many bullets had hit him. He was pronounced dead at the scene at 12:56 p.m., the police said.

They did not release the names of the officers involved. Investigators were still determining how many shots the officer had fired, Chief Monahan said.

The officers were treated for tinnitus, or ringing of the ears, but none were injured in the encounter, the police said.

A police spokesman, J. Peter Donald, said that the Emergency Service Unit, whose officers have advanced training in dealing with emotionally disturbed people, would have been notified of the call in East Flatbush. But Mr. Donald said he did not know if officers from the unit had been dispatched to the scene.

The Police Department is under pressure to expand the number of officers who receive specialized training in handing people in severe mental crisis. Such encounters are among the most unpredictable situations officers face, and while most end peacefully, they can escalate quickly.

Last October in the Bronx, Deborah Danner, a 66-year-old woman with schizophrenia, was fatally shot by a police sergeant in a confrontation in her apartment. Almost immediately, investigators raised questions about the circumstances of the shooting. In May, the sergeant, Hugh Barry, was charged with murder.

The Police Department responds to about 150,000 calls each year for what the agency calls emotionally disturbed people. Before Ms. Danner was killed, the department began what it called critical incident training, based on a model developed in Memphis. The department plans to train 5,500 officers out of a total 36,000 uniformed personnel, but its critics say that is hardly enough.

In East Flatbush, an enclave of Caribbean immigrants, residents of the apartment complex, Flatbush Gardens, said Mr. Jeune, a native of Guyana, showed visible signs of emotional or mental difficulties, such as stamping of his feet when he walked, but he was not considered threatening.

“He didn’t bother nobody,” Regina Blain, 22, said. “He minded his own business.”

Ms. Blain, who lives in another building across the courtyard, said she heard four gunshots on Monday afternoon but did not see what happened.

Shawn Lee, 26, said he lives in the unit directly above Mr. Jeune’s, and knew him and his parents. Mr. Lee said he often saw Mr. Jeune outside his apartment listening to music on a phone without earbuds, and singing along, but not loudly enough to be a disturbance.

Mr. Lee said he was not home when the shooting occurred, and did not know what had led to it, but whatever troubles the victim had, “I didn’t expect it to go this far.”