Police in Maryland promised a thorough investigation Friday into the death of a man in custody after police shocked him with a stun gun outside a home he had allegedly broken into.

At least one officer shocked the man after he refused to get down on the ground and became aggressive, according to police and eyewitnesses. Several people who watched the incident late Thursday night said officers didn't punch or kick the man before or after he was shocked and handcuffed.

"They wasn't physical or nothing like that. They were pretty much doing their job," said Robert Holmes, who lives in the neighborhood of modest, single-family homes and row houses near a scrap-metal business and an old pipe-organ factory in the city of 40,000 about 70 miles west of Baltimore and Washington.

Holmes said an officer fired his stun gun from six to eight feet away after the man, who was yelling and cursing, moved toward him in an aggressive manner.

None of the neighbors said the man was armed, and none of them recognized him.

The Washington County Sheriff's Office, which is investigating the death, identified the man as Darrell Lawrence Brown, 31, of Upper Marlboro, a Maryland suburb of Washington, D.C.

Brown died either inside an ambulance, accompanied by two officers, or at the local hospital where he was pronounced dead shortly after midnight Friday, Hagerstown Police Chief Mark Holtzman said at a news conference.

"He was conscious and he was still argumentative with the police even when he was being loaded in the ambulance to be transported to the hospital," Holtzman said.

The police department said the officers believed Brown was under the influence of drugs.

The Washington County Sheriff's Office will investigate the death, including reviewing any video captured by police surveillance cameras, Sheriff Douglas Mullendore said. He said his investigators also will study data from the officers' TASER-brand stun guns to determine how many times Brown was shocked and for how long.

Mullendore promised "an independent investigation that is accurate, thorough and complete."

He said the state medical examiner's office will conduct an autopsy to determine the cause of death.

All five officers have been reassigned to desk jobs pending the outcome of an internal investigation, Holtzman said.

Police said 911 dispatchers got a call about a disturbance at about 10:30 p.m. On the call, a female was screaming in the background. A second caller reported a break-in and said the suspect was in front of her home, stumbling around.

Two officers responded initially, followed by two more and a sergeant, police said.

Nine-year-old Tera Gibbs told The Associated Press the man kicked in the locked front door of her family's row house and came upstairs, where she and her sisters sleep. Their mother, Laura Mirfin, said she was out, taking home a friend of one of her children. That left Tera, her little brother and three sisters, ages 13 to 16, in the house.

"The door just flew open," Tera said. She said she tried calling 911 without success, then roused her sisters. She said 14-year-old Daisy pushed the man outside and 16-year-old Barbara grabbed a knife and called 911, summoning police.

Mirfin said she was proud of her children. "They were awesome," she said.

The U.S. Justice Department advised police officers in 2011 to avoid shocking suspects multiple times or for prolonged periods to reduce the risk of injury or death. The report followed a study of nearly 300 cases in which people died from 1999 to 2005 after police shot them with stun guns. It found that most of the deaths were caused by underlying health problems and other issues.

Steve Tuttle, a spokesman for Scottsdale, Arizona-based TASER International Inc., told the AP for a story earlier this week that the weapons are safe, effective and accountable but "there is no magic bullet."

The suspect was black and all the officers involved were white, police said. Race has not been raised as a factor in the death, but it comes amid a national debate about the deaths of black men at the hands of police.

___

The AP's Jennifer Peltz in New York contributed to this story.