Interim Assistant Portland Police Chief Robert Martin walks back down Allen Avenue in Portland on Friday. Credit: Troy R. Bennett / BDN

To reach a suicide prevention hotline, call 888-568-1112 or 800-273-TALK (8255), or visit suicidepreventionlifeline.org.

The man who apparently fatally shot himself in Portland on Friday afternoon — causing a large police response before his body was found — was not allowed to have firearms and had several taken from him under Maine’s yellow flag law last month, police said.

Almost three weeks ago, on Nov. 26, the man was taken into protective custody by Portland police, who used the yellow flag law to remove several firearms that were in his possession, Portland Police Chief Mark Dubois said in a news release Friday evening. The man was also prohibited from obtaining firearms at that time.

Portland police still have not identified the man, pending notification of his family. They also didn’t say how he may have obtained the weapon that he used in the apparent suicide on Friday.

The incident could raise further questions about the efficacy of state laws that are meant to prevent people who have demonstrated a threat to themselves or others from obtaining or holding onto guns. These laws have come under new scrutiny following the Oct. 25 mass shooting in Lewiston.

That shooting was committed by Robert R. Card II, an Army reservist who was able to access firearms after threatening to shoot up an Army Reserve base in Saco and spending two weeks in a New York psychiatric hospital last summer.

State and national experts have suggested the Lewiston shooting might have been averted if authorities had triggered the yellow flag law, which allows police to temporarily confiscate guns from people deemed to be a threat to themselves or others.

In the case in Portland on Friday, that law was apparently used with some success to previously remove firearms from the man who died, but it’s unclear how he got his hands on the gun he is believed to have used Friday to fatally shoot himself.

That man, who lived in a condo at 459 Allen Ave, was being served with official documents just after noon when officers heard a gunshot inside his unit. After a couple hours, police finally confirmed that he’d died when they sent three robots and then a police dog and a SWAT team into the man’s home.

Police advised residents of his condo complex to shelter in place, closed down the street and told reporters early in the afternoon that there was no immediate danger to people outside the complex.

One of the man’s neighbors, Janice Murphy, described him as quiet and friendly, but said that he also seemed troubled and like “kind of a lost soul.” He took aimless walks around the property, she said, and police officers had previously been at his unit in recent weeks.

BDN writer Troy R. Bennett contributed reporting.