PITTSBURGH (AP) — Two people have been charged in a shooting that injured six people, one critically, outside a Pittsburgh church where a funeral was being held, authorities said.

Nineteen-year-old Shawn Davis of McKees Rocks and a 16-year-old Pittsburgh youth are both charged with attempted homicide, aggravated assault and weapons counts in the noontime gunfire Friday outside Destiny of Faith Church, where a funeral was being held was for a man killed in a shooting earlier this month.

The service was being livestreamed, and the video showed several people screaming and ducking for cover. It wasn’t clear if any shots went into the church. One person was taken to a hospital in critical condition while four other shooting victims were listed as stable. A sixth person injured trying to escape was also treated.

Prosecutors said surveillance footage indicates two masked people carrying guns with extended magazines walking toward the church and one shooting at a man on the sidewalk. The suspects were later arrested in McKees Rocks after a car seen driving from the scene was stopped on a bridge, authorities said.

Court documents don’t allege a motive for the shooting, and authorities said it wasn’t immediately clear whether it was related to the funeral. The violent crimes unit is investigating. The defendants are also charged with cruelty to an animal in an injury to a horse that had been pulling the casket and was apparently hit by a bullet fragment.

Court documents don’t list attorneys for the defendants. Listed numbers for them couldn’t be found Saturday.

The Rev. Nicita Moses called the scene inside the church chaotic. He said people heard shots and “everyone started running,” the Tribune-Review reported.

“Why would someone come to a funeral and try to kill even more people?” Moses asked. “It’s upsetting.”