A 28-year-old Seattle man with a history of psychiatric problems was under two court orders not to possess a gun when he allegedly fired a pistol at Seattle SWAT officers, who in turn fatally shot him inside his Capitol Hill apartment on Friday morning, police said.

Interim Police Chief Jim Pugel said detectives are working to figure out how the man obtained the Glock 9-mm handgun police recovered from his fifth-floor condo.

Police said the man, whose identity has not been released, was well known to the department’s Crisis Intervention Team, which is trained to respond to and follow up on reports involving the mentally ill.

On Thursday the man apparently posted an online video of a telephone call he purportedly made to the Washington State Patrol (WSP) inquiring about his right to own a gun after having been committed to a mental hospital.

Most Read Stories

He concluded that he could, although Pugel said Friday that judges in King and Snohomish counties had barred him from possessing firearms.

“We don’t know if he stole it or if he had a friend buy it;” however, the court orders should have prevented him from buying the gun directly, the chief said. The man did not have a concealed-firearm permit for the Glock, which originated with a Spokane gun wholesaler, though it’s unclear how the 28-year-old got possession of it.

According to Pugel, crisis officers had at least seven contacts with the man in the past four months. In April, he visited a software company where he used to work and asked employees there to mail a suspicious package. In May, officers served civil-commitment papers ordering him hospitalized him for a psychiatric evaluation, Pugel said.

“I don’t know what the evaluation revealed,” he said.

The man’s name has not yet been released by the King County Medical Examiner’s Office, and the man’s relatives in Texas, Illinois and Minnesota could not immediately be reached.

Along with the videotape of his call to the WSP, the man wrote: “I think that if one of my fundamental rights as an American citizen had been revoked at all, I would definitely clearly remember it, or would have been sent home with an important document or something. Or at least someone would be jumping on the chance to remind me that I can’t own a gun … So I am going to go forward assuming I’m not breaking the law if I have a gun on me.”

According to his Facebook page, the man had a long history of mental illness and had been recently diagnosed with cancer. He had worked as a software engineer for about three years, but listed his current employer as “Lucifer.”

The standoff began shortly after 3 a.m. Friday when several residents at the Marq Condos, on the corner of Denny Way and Bellevue Avenue, reported hearing shots and seeing a man with a gun walking around the hallways.

Officers responded and knocked on the man’s door, but backed off and called SWAT officers and hostage negotiators when he “started making threats (he) would shoot anyone who came into the apartment,” said police spokesman Mark Jamieson.

After an hours-long dialogue with police, the man stepped out of his apartment with a weapon in his hand, and later, officers heard what sounded like a shot fired inside the unit, Jamieson said.

When he appeared again and fired his gun “in the direction” of the SWAT officers, Jamieson said one officer returned fire and the man retreated inside the apartment. When he reappeared waving the gun, a second SWAT officer shot and killed him about 10:30 a.m.

The shooting is certain to attract scrutiny, since the SPD is under a federal court settlement agreement to address issues of excessive force identified during a Department of Justice investigation. The DOJ found that many of the victims of unlawful police force were mentally ill or under the influence of alcohol or drugs.

A court-appointed monitor selected to enforce the agreement, Merrick Bobb, has said his team would look closely at such incidents.

Jonathan Kruger, who lives in a building across the street from the Marq Condos, said he watched the standoff from his roof. He saw officers lower a phone from the balcony above the fifth-floor condo and instruct whoever was inside to pick it up.

Later, Kruger said he heard “three or four shots, bang, bang, bang, then a shot returning fire, then perhaps a minute or two later, another shot,” Kruger said.

“I felt like I knew where I should or shouldn’t be, but I was definitely staying around a couple of corners while things were playing out,” he said.

Friday’s shooting was believed to be the fifth officer-involved shooting in Seattle this year, and the third involving a mentally ill man.

They include:

• In January, officers fatally shot James D. Anderson, who had shot and wounded two people at a Central District bar.

• In June, Joshua Guarino reportedly called officers to his Magnolia house, where he ran toward them with a knife. He was shot and injured, and his parents later told officers Guarino suffered from a mental illness and wanted police to kill him.

Seattle Times reporters Paige Cornwell, Jimmy Lovaas and Mike Carter and news researcher Miyoko Wolf contributed to this report. It includes information from Seattle Times archives.