يَـٰٓأَيُّهَا ٱلَّذِينَ ءَامَنُوا۟ لَا تَتَّخِذُوا۟ ٱلْيَهُودَ وَٱلنَّصَـٰرَىٰٓ أَوْلِيَآءَ ۘ بَعْضُهُمْ أَوْلِيَآءُ بَعْضٍۢ ۚ وَمَن يَتَوَلَّهُم مِّنكُمْ فَإِنَّهُۥ مِنْهُمْ ۗ إِنَّ ٱللَّهَ لَا يَهْدِى ٱلْقَوْمَ ٱلظَّـٰلِمِينَ
“O believers! Take neither Jews nor Christians as awliya — they are awliya of each other. Whoever does so will be counted as one of them. Surely, Allah does not guide the wrongdoing people.”
This ayah (Q5:51, on not taking allies who betray the community's trust) reflects the concern behind expelling Banu Qaynuqa for their treachery, described at this event.