Who Were Battles Fought Against in the Time of the Prophet (pbuh)?
One important point that needs to be remembered regarding the battles described in the Qur'an is "the other side" in the fighting. Some religious and historical sources say that the battles fought in the time of our Prophet (pbuh) were against the Jews. Some people who read those sources then go on to look for anti-Semitism in the Qur'an, claiming that the verses revealed for specific battles in the Qur'an are generally directed against the Jews. That is a grave error, however.
It was the pagans who engaged in that persecution against our Prophet (pbuh) and Muslims. A great many of these were idol-worshipers. Their aim was to prevent any harm from coming to their idols and perverse beliefs. Some were hypocrites and polytheists who had come out of Jewish communities but it would be very wrong to refer to these as Jews. In the same way that it would be very wrong to regard a polytheist or hypocrite who emerged from a Muslim community as a "Muslim," it is equally wrong to regard polytheists and hypocrites who emerged from among Jews and began spreading violence as "Jews." It is impossible for a true Jew to start fighting and take the lives of believers.
The Qur'an curses anti-Semitism. For that reason, those who look for expressions of enmity toward the Jews in the Qur'an return empty-handed; people who interpret the verses in question as referring to fighting against the Jews need to understand this. Our Prophet (pbuh) always enjoyed good relations with Jews. He treated them with respect and affection, and true, devout Jews treated our Prophet (pbuh) with that same respect and affection. This topic is explained in detail later in the chapter about the People of the Book. (See chapter "The Outlook of Islam on the People of the Book")