all this happened in order that allah may recompense the truthful for their truth and may punish the hypocrites if he would or relent toward them. verily allah is ever forgiving merciful.
ليجزي الله الصادقين بصدقهم ويعذب المنافقين إن شاء أو يتوب عليهم إن الله كان غفورا رحيما