Abstract. In recent experiments in the Large Helical Device, a stable plasma was observed beyond the critical beta value predicted by the linear stability calculation. Local flattening of the pressure profile at the resonant surfaces is one of the mechanism to understand the experimental results. In order to study the generation of such locally flattened structure a nonlinear MHD calculation code has been developed. This code solves the reduced MHD equations for the multi-helicity perturbations in the toroidal configuration. In a Mercier unstable equilibria, the pressure profile is deformed at the Mercier unstable region at the nonlinear stage. This implies that the plasma is self-organized so that the ideal instability could be saturated. The deformed profile shows not only the local structure around the resonant surfaces of the dominant components but also the global structure in the radial direction. Hence, the cooperative behavior of the modes is also important in the saturation. It will be studied comprehensively what kind of parameter dominates the nonlinear state, such as the local flattening, broad deformation and internal disruption.