Updated

A black-clad gunman ambushed two undercover detectives returning to a police station early Tuesday, but they received only minor injuries and helped in the hunt for the attacker.

Police Chief Charlie Beck described the attack as an attempted assassination and mobilized a huge search.  About 200 officers, aided by helicopters and dogs, looked for the gunman, described as a black man in his 30s with a mustache and goatee, dressed in black and wearing a black cap.

Police initially cordoned off 25 square blocks of the Mid-City area, leavings thousands of residents stranded in their homes and forcing drivers to find detours for their morning commutes.  Three or four people were detained for questioning and police planned to look at surveillance video from homes and businesses in the area, Cmdr. Andrew Smith said.

"Anybody who's willing to do this and take on two armed police officers outside of a police station is obviously a very dangerous person," he said. "We want to do everything we can to get this individual in custody so we can keep our community safe."

The detectives, who are with an undercover burglary task force, had conducted an investigation and returned to the Wilshire Division station on Venice Boulevard at about 4:30 a.m. Tuesday. They were using a keycard to open the gate when they were attacked, police said.

"Suddenly someone from behind began shooting at their vehicle," Smith said.

The car was hit several times and the detectives fired back, but the man ran away, Smith said. The gunman and detectives fired more than a dozen shots, he said.

One officer suffered a minor wound to the back of his head, either from a bullet graze or debris from the damaged car, Smith said. The other had an injury to the back of his hand. They were treated at a hospital and returned to a command post for the manhunt. One detective has 20 years on the job and the other is an 11-year veteran, Smith said.

The shooting was believed to be an isolated attack, but as a precaution all other police stations were notified to be on high alert, Smith said.