This paper deals with the nonlinear stability properties of external, ideal magnetohydrodynamic (MHD) modes with helical symmetry in a tokamak. Based on an analysis of bifurcated equilibria in cylindrical geometry, the investigation is concerned with non-resonant, nearly marginal modes with poloidal mode numbers . The analysis is to a large extent analytical and based on an expansion in the helical mode amplitude. The final results, however, are obtained numerically. A systematic investigation of the dependence of the nonlinear effect on poloidal mode number, current profile and wall distance is performed, including current profiles which are peaked off-axis. The results show that helical modes with with realistic wall distances are, in principle, nonlinearly stable, i.e. the bifurcation is supercritical, for all studied current profiles. The stabilizing effect increases with m and depends strongly on the mode number. For high m, the nonlinear effect is significant even at very small mode amplitude and, consequently, the amplitudes of helical states with high m are very small. Also, the stabilizing effect depends strongly on the current profile and increases when the profile is peaked. However, if too much current is flowing in a region near the plasma edge, the bifurcation is still supercritical but the amplitudes of the bifurcated equilibria are very large, thus indicating a situation where nonlinear stability would not be obtained in practice. This finding may be of interest in connection with high-performance tokamaks operating with a large fraction of bootstrap current. The requirement of reduced current density near the plasma edge is most stringent for the m = 2 mode.