I believe it was Richard the Lionhearted on the occasion of the capture of Jerusalem. Both Christians and Moslems had taken refuge in a church. Since they both dressed alike, the Crusaders could not tell them apart.
Richard's solution was, "Kill them all, and let God sort them out!"
A contemporary commentator reported that the blood "ran ankle deep in the nave of the church".
This quotation is actually from Arnaud Amalric when dealing not with Muslims, but with Cathars.