A man who was fatally shot at a Maryland cemetery Wednesday afternoon was attending the funeral of his younger brother, who had been killed in a West Baltimore homicide weeks earlier, police said.

Mourners were gathering around the burial site of Marcus Brown, 18, about 12:40 p.m. at Mount Zion Cemetery in Lansdowne when gunfire erupted from a small group of men separated from the larger crowd, Baltimore County police said.

The shooting killed Maurice Brown, 32, and left another man in critical condition, police said. A third person was taken to a hospital for chest pains.

Police said they think the shooting was targeted and are working to determine how many shooters and weapons were involved.

Local news footage showed that Marcus Brown’s casket had not yet been lowered into the ground when the crowd of mourners scattered among the gravestones to flee the shooting.

Baltimore city police said Marcus Brown was killed on Aug. 25 in the 1400 block of North Mount Street.