Order or instruction is subject to execution, if it is given in an intra vires manner. Meanwhile, the obligation to obey an order or instruction has some limits, in particular, in the case, when it inflicts damage to the interests protected by law.
The order or instruction is unlawful, if it contains requirement to commit a crime or an offence.
According to Article 47 of the RA Criminal Code inflicting damage to the interests protected by criminal law, by the person who acted pursuant to compulsory, appropriately given order or instruction, is not considered a crime. The person who gave such illegal order or instruction is liable for that.
The person who committed a willful crime by obviously illegal order or instruction is liable on common grounds.
Refusal to execute an obviously illegal order or instruction is an exemption from criminal liability.
The source: iravaban.net