Five people were killed in an attack on a church west of Johannesburg in the early hours of Saturday, South African police said, with some of the attackers taking hostages who were later freed.
Police arrested around 40 people and seized 40 firearms, including rifles, shotguns and handguns, related to the attack on the International Pentecost Holiness Church in Zuurbekom, police spokesman Vishnu Naidoo told the eNCA television station.
Police earlier posted pictures of some of the confiscated weapons on Twitter, saying they were dealing with a "hostage situation and shooting".
One potential motive for the attack is a power struggle at the church between rival factions, local media reported.
"(E)verything was in complete disarray, so we have arrested all those that we reasonably believe are suspects, we are busy interviewing and interrogating them to establish exactly what the motive was," Naidoo told eNCA. (Reporting by Alexander Winning and Lynette Ndabambi; Editing by Toby Chopra)