We explore a response of a non-linear non-axisymmetric mean-field solar dynamo model to shallow non-axisymmetric perturbations. After a relaxation period the amplitude of the non-axisymmetric field depends on the initial condition, helicity conservation, and the depth of perturbation. It is found that a perturbation which is anchored at r=0.9R has a profound effect on the dynamo process, producing a transient magnetic cycle of the axisymmetric magnetic field, if it is initiated at the growing phase of the cycle. The non-symmetric with respect to the equator perturbation results in a hemispheric asymmetry of the magnetic activity. The evolution of the axisymmetric and non-axisymmetric field depends on the turbulent magnetic Reynolds number R_m. In the range of R_m=10^{4-6} the evolution returns to the normal course in the next cycle, in which the non-axisymmetric field is generated due to a non-linear alpha-effect and magnetic buoyancy. In the stationary state the large-scale magnetic field demonstrates a phenomenon of active longitudes with cyclic 180 degree flip-flop changes of the large-scale magnetic field orientation. The flip-flop effect is known from observations of solar and stellar magnetic cycles. However this effect disappears in the model which includes the meridional circulation pattern determined by helioseismology. The rotation rate of the non-axisymmetric field components varies during the relaxation period, and carries important information about the dynamo process.