A Long Island man fatally shot his teenage brother inside a parked car, police said.

Suffolk Country police responded to a call that Dimitri Robert, 27, was threatening family members with a gun outside a home on Judith Drive in Coram on Tuesday night, officials said.

Just as cops arrived, Robert hopped into a car parked outside the house and shot his 17-year-old brother, Devontay, who was sitting in the passenger seat, police said.

The medical examiner pronounced Devontay dead at the scene.

Robert — who was staying temporarily at the Coram residence — was arrested and charged with second-degree murder, Suffolk County police said.

He is expected to appear in court Wednesday.