A man was shot in Centereach early Sunday morning and a responding police officer suffered minor injuries when a vehicle struck a police car, Suffolk County police said.

A “group of men” went to a home on North Washington Avenue in Centereach and confronted a resident around 2:40 a.m., police said in a statement Sunday night.

“Detectives do not believe this is a random incident,” police said.

A man was shot during the confrontation and taken to Stony Brook University Hospital for treatment.

advertisement | advertise on newsday

As the group was trying to leave the scene, a vehicle hit a responding police car, police said. The officer inside suffered minor injuries.

Sixth Squad detectives are investigating.