In the ASDEX Upgrade tokamak, the growth of non-axisymmetric magnetic perturbation (NAMP) associated with the ELM crash events has been observed, and both the poloidal and toroidal phases of NAMPs, measured by a set of Mirnov coils, were highly random. By applying an n = 1 magnetic perturbation (MP) field, the phases of NAMPs were locked to the phase of the total n = 1 resonant MP (RMP) field, which takes the plasma response to the MP field into account. This observation can be explained by the resonant electromagnetic J × B torque applied by the RMP field on a magnetic island formed due to the magnetic reconnection, which is predicted to occur during the ELM crashes by several numerical modelling results.