The Messenger of Allah ﷺ said, "Whoever swears by a religion other than Islam, lying deliberately, is as he said."
حدثنا محمد بن المثنى حدثنا ابن أبي عدي عن خالد الحذاء عن أبي قلابة
قال رسول الله ﷺ من حلف بملة سوى الإسلام كاذبا متعمدا فهو كما قال
Bukhari transmitted it in "Funerals," chapter "What Has Been Said Concerning One Who Kills Himself," no. 1363, from the hadith of Khalid, and Muslim in "Faith," chapter "Explaining the Severity of the Prohibition of a Person Killing Himself and That Whoever Kills Himself with Something..." no. 110, from the hadith of Abu Qilaba, through the same chain.