New York City cops killed a teen gunman late Saturday night after the 16-year-old allegedly pointed a gun at the undercover officers in Brooklyn.

The gunman, 16-year-old Kimani "Kiki" Gray, was standing in front of a home in the East Flatbush section of Brooklyn with five other youths when he saw the two undercover cops around 11:30 p.m. Saturday, the New York Daily News reported.

When Gray noticed the cops, he walked away from his friends. The cops then approached the 16-year-old, and Kimani allegedly turned toward them with a .38-caliber revolver in his hand, the paper reported.

That’s when the undercover cops, a 30-year-old sergeant and a 26-year-old officer, fired shots at the teen gunman, who was fatally hit in his torso and legs.

The 16-year-old was seen grabbing his side and screaming after being shot, neighbors told the New York Post.​

Kimani died at Kings County Hospital.

The teen gunman’s family was distraught over his death. His mother, Carol Gray, fainted when she learned her son died.

“It’s going to drive the whole family crazy,” a cousin of Gray, Malike Vernon, said of the teen’s death. “He's the type of person who is fun to be around. He's the type who always gave you positive vibes.”

Vernon said he was unaware that Kimani had a gun.

"If I was there maybe I could have saved his life,” said Vernon, 19. “I could have told him to get rid of that.”

Two brothers who were hanging out with Kimani shortly before he was killed also said they didn’t realize he had a gun.

"The cops, they just jumped out of the car so fast," Devonte Brown, 16, told the Daily News. "They started shooting him and he went down.”

“We were just hanging out,” said Devonte’s brother, Akeem Brown. “We didn’t know he had a gun.”

The teen’s gun had four bullets in the cylinder, the Post reported.

Neighbors described the shots for the paper.

“I heard a lot of shots, rapid fire, about eight shots,” said one witness. “I heard the gun shots from my living room.”

Kimani’s friends would not say exactly what caused the officers to fire on the gunman. The 16-year-old did not fire shots at the cops, according to the Daily News.

The 16-year-old did have a prior arrest record that included grand larceny and inciting a riot, police sources told the Post.