When the Meccans (pagan) enemies of Islam came forth with a force to attack Medinah and annihilate Islam, the Banu Quraiza, the Jewish tribe in Medinah who agreed to abide by the peace treaty with the Muslims joined the enemy ranks and thus openly the treacherously broke the peace treaty.
The Prophet sent two of his deputies to reconcile with the Jews and reminded them of the peace alliance. The Jews responded: “There is no bond or compact between us and him”
Thus they had committed breach of the treaty right at the most critical moment of the war, joined hands with the invaders and endangered the entire population of Madinah.
After winning the battle against the Meccan pagans, the Prophet moved toward the Bani Quraiza tribe to justly reprove them (as per the treaty) for breaking the sacred agreed upon alliance. By his mercy, the Prophet asked the Jewish tribe as to who should be the judge to grant them the appropriate castigation. The Jews agreed that one of their own men, Sa’d ibn Mu’adh (a Jewish convert to Islam) to be their judge.
Thus Sa’d (and NOT the Prophet) questioned the Jewish tribe: “will ye, then bind yourselves by the covenant of God that whatsoever I shall decide, ye shall accept?” There was a murmur of assent. “Then” Proceeded Sa’d, “my judgment is that the men shall be put to death…”. Then the judgement was likewise implemented.
Now with this context to the incident one can clearly conclude that the Islamic state had a relationship of full tolerance and a comprehensive peace treaty with the Jews which all sides agreed to abide by. This treaty was broken by the Jews, who fought alongside the enemies of Islam, and were thus punished according to the judgement made by a man of their own liking and choice, whose judgement they promised to abide by.
Sir William Muir, a critic of Islam, praised the Prophet for his immense contribution to the world,
“We may freely concede that it (Islam) banished forever many of the darker elements of superstition for ages shrouding the (Arabian) Peninsula. Idolatry vanished before the battle-cry of Islam; the doctrine of the Unity and infinite Perfections of God, and a special all-pervading Providence, became a living principle in the hearts and lives of the followers of Mohammad, even as in his own…Nor are social virtues wanting. Brotherly love inculcated towards all within the circle of the faith; infanticide proscribed; orphans to be protected, and slaves (servants) treated with considerations; intoxicating drinks prohibited, so that Mohammadanism (Islam) may boast of a degree of temperance unknown to any other creed”. (The Life of Mahomet, p. 521).