This excerpt is taken from Sheikh al-Islam Imam Ibn Taymiyyah's book Al-Jawab al-Bahir fi Zuwar al-Maqabir, translated by Sheikh Ataullah Saqib.
The religion of all the Prophets was Islam and the call was to monotheism
It is a great favor of Allah Almighty that He sent the Messenger of Allah, peace be upon him, with guidance and the true religion so that the divine religion would prevail over all other religions. Thus, Allah the Generous sent the Messenger of Allah, peace be upon him, with a religion that was the religion of all the prophets before him. That religion was Islam. Now, whoever adopts any religion other than Islam will not be accepted, whether that person belongs to the earlier nations or the last nation. It is also a fact that the religion of all the prophets was Islam, as narrated in Sahihain. The Messenger of Allah, peace be upon him, said:
نحن معشر الأنبياء ديننا واحد والأنبياء إخوة لعلات
“We are the community of the prophets. Our religion is one, and we are brothers to each other.”
Reference: (Sahih Bukhari, Book of the Prophets’ Hadiths: Chapter on the Words of Allah Almighty (And mention in the Book Mary), Hadith 3442-3443; Sahih Muslim, Book of Virtues: Chapter on the Virtues of Jesus, peace be upon him, Hadith 2365 with slight differences)
In the Holy Quran, the Lord Almighty has informed that He mentioned following Noah, Abraham, Israel, and Moses, and said that they were all Muslims, united in worshiping one God who has no partner. Their goal and mission was that only Allah should be worshiped and that no religion should be adopted except the one ordained by Allah. Also consider that at the beginning of Islam, the command was given to pray facing Bait al-Maqdis (Jerusalem). At that time, this was Islam. And when this was abrogated and the command was given to pray facing the Kaaba, then this too was Islam.
Allah Almighty says:
لِكُلٍّ جَعَلْنَا مِنْكُمْ شِرْعَةً وَمِنْهَاجًا
“We have ordained for each one of you a law and a clear way.”
Reference: (5-Al-Ma'idah:48)
Thus, it is established that the Torah was a permanent law, the Gospel was a permanent law, and similarly, the Holy Quran is also a permanent law. Whoever followed the Torah and Gospel before their distortion, it is as if he followed the religion of Islam.
Whoever follows the distorted religion or the abrogated law is outside the religion of Islam, like the Jews and Christians. Because the Jews altered the Torah and denied our Master Jesus. Then they also denied the Messenger of Allah, peace be upon him. Similarly, the Christians altered the Gospel and then denied the prophethood of the Messenger of Allah, peace be upon him.
Thus, the Jews and Christians did not remain on the religion of Islam which was the religion of the prophets, but they are opponents of the prophets because they deny the truth and are at the forefront in promoting falsehood.