Police on Friday arrested Pierre Celestine, 35, charging him with murder and criminal possession of a weapon.

Two funeral-goers died and four others were wounded in the shootout, which officials said was sparked by a 20-year-old beef between mourners at the Emmanuel Church of God on Flatbush Avenue near Foster Avenue in Kensington.

Mourners had gathered for the funeral of José “Cheo” Robles, a member of the Bloods gang, law-enforcement sources said at the time.

Celestine allegedly sparked the violence by confronting Sharieff Clayton, 40, who was sent to jail for manslaughter in 1994, sources told The Post.

Clayton shot back, “You better get out of here; there’s going to be trouble!”

Celestine then allegedly left the church and returned in a silver car, fatally pumping a bullet in Clayton’s abdomen, police sources said.

Ronald Murphy, 44, of Brooklyn dove in front of his wife, Taisha, to shield her from the flying bullets — and was fatally struck in the chest, law-enforcement sources said.

Murphy had not been an intended target, officials said.

Two other men and two women were wounded in the gunplay.

One of the women was Murphy’s wife, despite her husband’s heroics, law-enforcement sources said.