Maricopa County Sheriff's Office says a man suspected of shooting a deputy last weekend shot and killed himself in front of detectives in Tempe overnight.

Sheriff Joe Arpaio said the investigation led them to an apartment complex near University Drive and Price Road.

Detectives reportedly went to a residence where they were going to speak with the suspect. At that time, the suspect, a 51-year-old man, reportedly pulled a rifle and shot and killed himself. No officials were injured, but SWAT teams were then called in to the scene.

A second person was in the apartment at the time and fled the scene, but was later found. That person is not believed to be involved in the shooting of the deputy.

During a press conference on Wednesday, Sheriff Arpaio said investigators learned that the suspect was pulled over by a deputy during a DUI task force. He was taken to the command center, his car was seized and he was given a cab ride home.

Several hours later, the suspect reportedly drove by in another vehicle -- a Cadillac -- and fired multiple shots at the deputy who was performing a separate traffic stop.

MCSO says weapons were seized at the apartment and they are now searching the Cadillac that the deputy reported seeing at the shooting scene.

RELATED: Deputy shot during traffic stop released from hospital

Sheriff Arpaio described the case as a "bizarre investigation" and said from the beginning that it was a "very, very difficult case" for investigators. He commended detectives for tracking down the suspect with very little evidence or witness descriptions.

“The way he was described that he was a psycho or something is not—he wasn’t a psycho--at all. He was a good guy," said Michele Martinez, a long-time friend of the suspect.

Martinez says the suspect was an intelligent man and an engineer. Knowing him for the last 16 years, she says this is uncharacteristic.

“This just doesn’t seem like his style,” Martinez said.

During a press conference, Arpaio said he believes the suspect was mad and targeting cops. The deputy was in uniform, and his patrol vehicle lights were flashing, clearing conducting a traffic stop.

“He’s not a revengeful type person. He’s not a person that goes completely off the hook," Martinez said.

But the sheriff believes otherwise and calls is a war on cops.

“People going after cops for no reason when cops are trying to do their jobs. The public and wWashington better get with it and start defending our cops," Arpaio said.

For several hours, terrified neighbors were evacuated while SWAT teams swarmed on the suspect's home.

“When we were over there, we heard a gunshot," said Alexis McCall, the suspect's next-door-neighbor.

The sheriff says the deputy who was shot was not wearing a body cam, even though deputies are now required to after a federal lawsuit.

MCSO says the situation is still under investigation.

The suspect is not being identified at this time.