BROCKTON (CBS) — A 45-year-old Brockton man was shot and killed by police early Thursday morning, officials said.

Plymouth County District Attorney Timothy J. Cruz said that Douglas M. Buckley was confronted outside 50 Thayer St sometime after 12:30 a.m., “with a police scanner with an ear piece in one hand and an apparent rifle in the other.”

Buckley dropped the apparent rifle and then pulled out what appeared to be a concealed handgun and pointed it at officers, Cruz said. Two Brockton police officers fired their weapons, hitting Buckley.

Police administered medical aid and called for an ambulance, and Buckley was pronounced dead at a Brockton hospital at 2:05 a.m., officials said.

“A preliminary investigation has revealed that both the rifle and handgun that Buckley allegedly pointed at Brockton Police officers were BB guns that closely resemble authentic guns,” Cruz said in a statement.

Before the shooting, Cruz said a woman entered the Brockton police station and reported that Buckley called her, saying he was at her Thayer Street home and threatening to burn it down. She said other people were inside the home, and Buckley had been drinking and making other threats, according to Cruz.

“Never had trouble in 40 years. Nice family,” said a neighbor who didn’t want to be identified.

The shooting is still being investigated.

WBZ NewsRadio 1030’s Lana Jones reports: