The Banu Qurayza were a Jewish tribe who lived in Medina. The tribe's men, apart from a few who converted to Islam, were sentenced to death in 627 in retaliation for Banu Qurayza's treachery and subversion in aiding the Meccan pagan enemies who had launched a ferocious attack on Madinah, in order to eliminate the Muslims and their allies during the Battle of the Trench.