A new type of phase matching based on the ring-shaped pump beam for efficient harmonic generation is observed. The ring-shaped beam is shown to provide self-organized phase matching for a wide range of refractive index variation, which may automatically compensate the spatially nonuniform phase mismatch created by the optical Kerr effect. Self-phase-matching is expected to be very efficient for frequency tripling of broadband and/or ultrashort pulses, as well as for high order harmonic generation. The high conversion efficiency approximately 1.5% of 1.06 mum radiation tripling in a pure Rb vapor for a very short interaction length approximately 4 cm is obtained, when a disk-shaped beam has been replaced by a ring-shaped beam.