They devised and Allah devised, and Allah is the best devisers.
They devised and Allah devised, and Allah is the best devisers.*** Occasion of Revelation This verse is a hint to /laylat-ul-mabit/ (the night when Ali (as) laid himself in couch of the Prophet (S) and a reference unto the heathens' plot for killing the Messenger of Allah (S). The Prophet (S) was informed of that plot by means of the Messenger Angel Gabriel, and then Ali- ibn-Abi- Talib (as) laid himself in the couch of the Holy prophet (S) under his mantle-piece.
So, the Holy Prophet (S) went out of his house by the same night and took shelter in the cave of Thur, from where he migrated to Medina. There were three plots, mentioned in the verse under discussion, by either of them infidels wanted to work against the Prophet (S). Those plots were designed in the meeting that the elders of pagans held in Dar-un-Nudwah, where they finally approved the second plan.
By that plan they decided that a young man from each of the tribes be chosen and they would be prepared so that all of them together could attack to kill him, in order that the charge of the murder might be laid equally on each tribe and the relatives of the Prophet (S) might not be able to fight against all those tribes together and thus there would be left to them no other choice but to receive his blood-money. The Arabic word /makr/ means: ‘deceit and trick’.
‘Azhari, a commentator, says: “People's deceit is recompensed by Allah's deceit and trickery.” There is a difference between the Arabic term s /qadr/ (treachery) and /makr/ (deceit). The meaning of the former is accompanied with breach of promise, while the meaning of the later is deceit in general. The verse addresses the Prophet (S) to remember when pagans began devising and consulting with each other how to defeat him and to kill him.
The verse says: “And (remember) when those who disbelieved plotted against you to take you captive, or to kill you, or to expel you...” They devised about him and Allah devised about them, too. That is, some of them plotted so that he (S) could not understand, and Allah devised against them in a way that they did not know, and punished them. The verse says: “...They devised and Allah devised...” Allah is the best devisers, because He pays to nothing but what is true and right.
This meaning lies in this fact that: He sends down the punishment upon those who deserve it.