Sayyiduna Abdullah bin Adi al-Ansari (may Allah be pleased with him) narrates that the Messenger of Allah (peace and blessings be upon him) was once sitting among the people when a man came and sought permission to speak to him in private. He (peace and blessings be upon him) gave him permission, and he spoke privately to him about killing a man from among the hypocrites. Then he (peace and blessings be upon him) raised his voice and said: "Does he not testify that there is no god but Allah?" He said: Yes, but his testimony is no testimony. Then he (peace and blessings be upon him) said: "Does he not testify that Muhammad (peace and blessings be upon him) is the Messenger of Allah?" He said: Certainly, but he has no testimony. Then he (peace and blessings be upon him) said: "Does he not pray?" He said: Certainly, but his prayer is no prayer. Then he (peace and blessings be upon him) said: "These are the very people whom I forbid killing." These are the words of al-Qattan's narration.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب صلاة الاستسقاء / 6502