Muhsin Hendricks, who is known as the world's first openly gay imam, was shot dead Saturday near the southern city of Gqeberha, South African police said.
The police said: The imam, who ran a mosque intended as a safe haven for gay and other marginalised Muslims, was in a car with another person when a vehicle stopped in front of them and blocked their exit.
"Two unknown people with covered faces came out of the vehicle and started firing multiple shots," said the Eastern Cape force in a statement.
"After multiple rounds of firing, they fled the scene, and the driver noticed that Hendricks, who was seated at the back of the vehicle was shot and killed."
"The purpose for the murder is unknown and forms part of the ongoing investigation," police said, urging anybody with information to come forward.
The International Lesbian, Gay, Bisexual, Trans and Intersex Association has condemned the killing.
In a statement, Executive director Julia Ehrt said: "The ILGA World family is in deep shock at the news of the murder of Muhsin Hendricks, and calls on authorities to thoroughly investigate what we fear may be a hate crime."