Updated

A Detroit police officer was still in critical condition Monday, hours after he was shot in the head during a puzzling attack by a man who answered the door at an apartment complex, officials said.

The officer and his partner arrived at the apartment building on the city’s west side after a woman called to report a domestic incident around 10:30 p.m. When the cops knocked on the complex door, the man – armed with a .380 nickel-plated pistol – began shooting.

“This is a sobering reminder of the dangers our officers face each and every day,” Police Chief James Craig said during a Monday morning news conference.

The shooter didn’t appear to have any connection to the domestic incident, and Craig said surveillance footage showed the man left his apartment – walking unsteadily – with the gun in his hand.

Craig said the officer fired at the shooter and both men fell simultaneously to the ground. The injured officer’s junior partner, who had only been on the force about six months, also fired, immobilizing the suspect and then dragging the wounded cop several feet away to safety. EMS was already on the scene due to the reported domestic dispute.

Neither the officer nor the gunman, who died, was publicly identified.

Craig called the actions of the junior officer “textbook.”

“Our officer out of the academy just six months performed in an outstanding manner,” he said.

The officer in critical condition is a 14-year veteran of the department and followed in the footsteps of his stepfather, who served as a Detroit cop for 22 years.

“His son enjoyed this job each and every day and looked forward to going out and serving the citizens of this city,” Craig said.

Though the officers who answered the domestic call were in uniform, Craig said the shooting did not appear to be a targeted attack.

“This is random,” Craig said. “This is not an orchestrated attack on police officers.”

Craig said it was the eighth time since September that a Detroit officer had been injured or killed in a shooting.

The Associated Press contributed to this report.