A 25-year-old man was shot and killed by police in a Bronx housing project early Sunday after the man allegedly pointed a gun at cops.

Police first found the man, Rashaun Lloyd, allegedly holding a gun when they responded to a report of shots fired in the Soundview Houses at about 1:50 a.m.

advertisement | advertise on newsday

They ordered him to drop it, police said, but instead he allegedly pointed it at them.

Three officers then fired 31 shots at Lloyd, NYPD Bronx Borough Commander Larry Nikunen told reporters at the scene,  striking him multiple times. It did not appear that Lloyd fired his gun at police, a source said.

Lloyd was taken to Jacobi Medical Center where he was pronounced dead.

A 9 mm firearm was apparently recovered at the scene. Four officers were taken to Montefiore Hospital for observation, police said.

advertisement | advertise on newsday

The shooting is being investigated by the department’s Force Investigation Division.