Al Anfal Ayah 30
وَإِذْ يَمْكُرُ بِكَ ٱلَّذِينَ كَفَرُواْ لِيُثْبِتُوكَ أَوْ يَقْتُلُوكَ أَوْ يُخْرِجُوكَۚ وَيَمْكُرُونَ وَيَمْكُرُ ٱللَّهُۖ وَٱللَّهُ خَيْرُ ٱلْمَـٰكِرِينَ ٣٠
And ?remember, O Prophet,? when the disbelievers conspired to capture, kill, or exile you. They planned, but Allah also planned. And Allah is the best of planners.