NEW YORK — Two plainclothes police officers shot and killed a teenage boy late Saturday night on a Brooklyn street, after the boy pointed a handgun at the officers, the police said.

The police said the officers, patrolling in an unmarked car in East Flatbush, came upon the teenager, identified as Kimani Gray, 16, in a group of men just before 11:30 p.m. The teenager separated himself from the group and adjusted his waistband in what the police described as a suspicious manner.

As officers got out of the car to question him, Gray turned and pointed a .38-caliber Rohm revolver at them, the police said; two officers fired, hitting the teenager. He was pronounced dead a short time later at Kings County Hospital Center.

Gray did not fire the handgun, which was recovered at the scene. Paul J. Browne, the chief spokesman for the Police Department, said the six-shot revolver was loaded with four live rounds.

“After the anti-crime sergeant and police officer told the suspect to show his hands, which was heard by witnesses, Gray produced a revolver and pointed it at the officers who fired a total of 11 rounds, striking Gray several times,” Browne said.

A woman who identified herself as Gray’s cousin said that a witness to the shooting told her that Gray, who was known as Kiki, was attempting to pull his pants up when he was shot.

Another cousin, Malike Vernon, 17, said that Gray had been at a party last night in the area where he was killed; Gray, who is of Guyanese and Jamaican descent, grew up in that neighborhood, Vernon said.

“If I was there, maybe I could have saved his life,” Vernon said.

Gray was the second youngest of seven children; his older brother, Jamar, died in a car accident two years ago, Vernon said, adding that Gray’s mother, Carol, had fainted at the hospital and was having heart problems.

“She’s going crazy,” Vernon said.

Relatives said they never knew Gray to have a gun, and they described him as a regular teenager who attended high school in Manhattan and liked soccer and basketball.

But, added the cousin who refused to be identified, “You know how kids are in the household. They’re different from how they are outside.”

The shooting came little more than 10 hours after officers shot a man on Staten Island after a traffic stop that turned violent. In that shooting, officers had information that the driver of the car, a white Toyota Camry, had a gun in his possession, the police said.

As a pair of plainclothes detectives, their shields displayed, approached the vehicle near Manor Road and North Gannon Avenue around 1:15 p.m., the driver accelerated in an attempt to flee, pinning one officer against another car, the police said. The second detective then fired his gun after he saw the driver, identified as Clinton James, 33, of Staten Island, reach for a weapon.

The man, struck at least once in the torso, continued to drive away but collided with several vehicles and then crashed into a utility pole. He was apprehended and sent to Richmond University Medical Center, where he was listed in stable condition.

The police said the driver had an extensive arrest record. A .44-caliber Taurus revolver was recovered from his car.

James was arrested on a list of felony charges including assaulting an officer, criminal possession and use of a firearm, resisting arrest and reckless endangerment.