A man brandishing a fake pistol was shot and killed by police Monday outside an elementary school in Brooklyn, officials said.

The police-involved shooting happened outside PS 194 located at 3117 Avenue W in the Sheepshead Bay section at around 3:10 p.m.

According to authorities, a 911 call was made about a man with a gun outside the school. Upon arrival, a uniformed officer encountered the suspect, identified as a 22-year-old white male, who pointed what appeared to be a silver handgun at the officer.

Police say the officer discharged three rounds of ammunition, striking the man. He was later transported to Coney Island Hospital where he was pronounced dead.

The investigation into the shooting is still ongoing.