A man opened fire with a shotgun during a church service Sunday, killing a woman and wounding a child before shooting another man outside and killing himself a few hours later, police said.

Second Deputy Police Chief James Tate said three people were shot, one fatally, at Zion Hope Missionary Baptist Church about 11 a.m EST.

"Church had begun, and shots rang out," Tate said.

About 5 1/2 hours later, Tate said officers spotted the suspect, who was identified as 24-year-old Kevin Lorenzo Collins, walking about a mile south of the church and saw him run behind a home.

"An officer then heard a loud boom," Tate said.

Collins died of what appeared to be a self-inflicted gunshot wound, Tate said.

The 9-year-old child was hit in the hand by a buckshot pellet, Tate said. The third victim, a man in his 50s, was in critical condition after being shot after he tried to protect his wife from a carjacking attempt by the gunman.

Ann Armstrong, 30, of Detroit, said she was in the church at the time.

"I seen him come in through the balcony door, and he pulled the gun from under his coat," Armstrong said. "He just started shooting her, then he shot at the pulpit."

A bullet hit a musical instrument, but no one at the pulpit was hit, she said.

Many of the hundreds of people in the church screamed as they ducked under the pews for protection, Armstrong said. After the gunman left, church members embraced each other before continuing to pray as police started coming in, she said.

"It was a lot of crying, a lot of hugging and a lot of praying," she said.

Church members then continued the service, Tate said.

"They didn't let this incident stop the reason why they came to church," he said. "They came to worship."

Police didn't know the relationship of the child and the woman who was killed, but say the two knew each other and were sitting near each other.

Church members helped police identify a suspect, Tate said.

The shooting was the result of a domestic dispute, Tate said, but he did not elaborate.

"This is not only happening at Zion Hope," said Rev. Curtis Grant, church pastor. "It's happening all around the city and it shouldn't have to happen in a particular church for us to be alarmed by what's going on."

In the last two weeks, for example, shootings have claimed the lives of two children in the city.

On Feb. 15, an 8-year-old boy was killed in his home by a stray bullet that was fired during a dispute between two groups of men outside. And last week, a 12-year-old boy was shot to death while walking on the street.

Grant asked people to pray for those involved in the church shooting.

"The sanctity of our sanctuary has been disturbed," Grant said. "We're just trying to get the families and children through this tragedy."