Ibn 'Umar (May Allah be pleased with them) said:
The Messenger of Allah (ﷺ) said, "When a person calls his brother (in Islam) a disbeliever, one of them will certainly deserve the title. If the addressee is so as he has asserted, the disbelief of the man is confirmed, but if it is untrue, then it will revert to him."[Al-Bukhari and Muslim].
App reference: Book 18, Hadith 222
Arabic/English book reference: Book 18, Hadith 1732