BROOKLYN - A man was fatally shot by police after he allegedly pointed a gun at officers in the Bronx early Sunday morning, police say.

It happened around 2 a.m. on 1725 Randall Ave.

Police say officers received a Shot Spotter alert and 911 calls about a man with a gun near the Soundview Houses.

Responding officers located the man and asked him to drop the gun. Officials say that is when he pointed it at the officers.

Police say they fired 31 bullets and at least three officers fired the shots.

The man has been identified as 25-year-old Rashaun Lloyd. He was taken to Jacobi Medical Center, where he was pronounced dead.

No officers were injured.

Police say a gun was recovered at the scene.

Authorities say that Lloyd had prior arrests, but could not specify if he had any convictions. They say he was previously arrested for robbery, criminal trespass and possession of marijuana.

Friends who did not want to speak on camera tell News 12 that Lloyd did not have a violent history. They gathered at the scene to light candles for Lloyd, who they say was a good friend and a good father.