A K-9 officer was shot and killed in Sellersburg, Indiana at the start of a nine-hour police standoff with a man who fled from and shot at officers trying to serve him with a warrant on Monday, police said.

Sellersburg police officers approached a man with a warrant and he ran away and then fired several shots, said Sellersburg Police Trooper Brock McCooe. The shots hit a police dog and a deputy.

The human officer was shot in the leg and was in stable condition at a nearby hospital, but the K-9 officer was fatally wounded, said McCooe.

According to NBC affiliate Wave 3 News, the dog's name was Kilo, and he had assisted with numerous drug busts.

The suspect ran into a house that was empty at the time and barricaded himself inside, officials said.

Judy Frazier lives three houses away from where the suspect holed up, and said she had not been able to leave her own home for most of the afternoon and evening.

“The SWAT teams are on roofs they’re in yards, they’re everywhere,” she said while the standoff continued.

McCooe said the suspect finally responded to commands through a loudspeaker a little after 9:30 p.m. “He just walked out and gave up,” he said.

In a statement following the suspect’s surrender, Sellersburg Police Chief Russ Whelan said the man came out of a closet and then emerged out of the backdoor wearing a torn up t-shirt and his boxer shorts. He was unarmed and not injured even though Whelan said police had thrown about 40 tear gas canisters into the house.

“Now the work starts as far as processing the scene and collecting the evidence and building our case,” said Whelan.

Authorities on Monday night had not yet released the name of the captured man.

The wounded officer, Chris Proctor, is a member of the Clark County SWAT team, who were early to the scene to assist Sellersburg police. Clark County Sheriff Daniel Rodden said Proctor will have surgery on his knee on Tuesday morning but is “in good spirits.”