Police have identified the suspect as 24-year-old Joseph Roy.
"We still do not know why he did this," said Lt. Bill Dooley at a press conference Wednesday morning.
The Fresno Police Department is working to build a timeline that helps explain why Roy attacked a detective.
UPDATE: @FresnoPolice have identified the man accused of assaulting a detective yesterday in the Annex Building at PD HQ as Joseph Roy, 24. Officials say Roy attended a court hearing before he was shot & killed. It was related to an assault with a deadly weapon in 2021. @ABC30 pic.twitter.com/xJIbnxxoNg
— Jessica Harrington (@JessicaABC30) March 30, 2022
Earlier in the day Tuesday, Roy appeared at the Fresno County Courthouse to be sentenced for an assault where he used a "blunt object" to injure a man last year.
Roy had agreed to plead no contest to assault by means likely to produce great bodily injury.
In return, there would be no prison or jail time, but possible GPS tracking.
He was also required to complete alcohol and anger management treatment and wasn't allowed to have a firearm.
If he completed all of that, and stayed out of trouble, the conviction would be reduced from a felony to a misdemeanor after a year.
Court sources say the sentencing was postponed after Roy's attorney expressed concern that Roy didn't fully understanding the proceedings.
"There's some time that took place between when he left the courthouse and when the assault on our detective took place," said Lt. Dooley.
Investigators aren't saying how much time passed before Roy entered the Annex Building.
Pictures of the detective's injuries show a gash to the top of his head and a cut down the side of his face.
*WARNING GRAPHIC* Officials say the motive for the attack on the detective is still unknown. He had a puncture wound to his head, a laceration from his head down the side of his face, and a concussion. He has been released from the hospital. @ABC30 pic.twitter.com/AeTmSDTIl2
— Jessica Harrington (@JessicaABC30) March 30, 2022
Officials say the detective also had a concussion.
He has since been released from the hospital.
Fresno Police say the department has had four contacts with Roy in the past.
He was arrested on felony charges in 2018 and 2021 and, on two separate occasions, he was placed on a mental health hold.
Officials say the detective who was attacked was never assigned to Roy's cases and never had previous contact with him.
"As far as we can tell. This is a random attack on our detective, but we're still trying to piece that together and figure out why." Lt. Bill Dooley said.
Investigators say they're also still trying to determine how the suspect got into the Annex building.
Police say you must have a key fob to enter any door, including the one the public has access to on Fresno Street.
Until they figure out how the suspect got in, they've stationed an officer at the public entrance for an added layer of security.
A man just approached the building. An officer opened the door, spoke to him briefly and closed the door. About 30 seconds later the officer opened the door again and let the man inside. @ABC30 https://t.co/TxmqGV1L7E pic.twitter.com/hwdXO33Zde
— Jessica Harrington (@JessicaABC30) March 30, 2022
"That's the most aggressive step we can take at this point other than closing the entire building down, which we're not going to do," said Lt. Dooley.
We tried stopping by known addresses of the suspect to try to talk to family members, but they did not want to speak.
Roy's attorney also declined to comment.
Investigators are looking at surveillance video to see how the suspect got inside, they say there are no cameras inside the annex building, so they'll be relying on exterior cameras to help them piece it together.