His [devil] companion will say, “Our Lord, I did not make him transgress, but he [himself] was in extreme error.”
[Allāh] will say, “Do not dispute before Me, while I had already presented to you the warning.
The word will not be changed with Me, and never will I be unjust to the servants.” [Qaaf:27-29]
The situation reminds me of what we often see in schools within groups of friends. They are always cheering the other on in actions that they think are bad to gain popularity points. However, when they are caught everyone is very fast to forget their friendship and inform of who was behind the acts. In the same way we are befriending the devil when we copy what he does but even he will betray us. We must remember that he is not our trustee.