The light induced change of refraction is studied in pure and Mg doped LiNbO3 with congruent and stoichiometric compositions by the Z-scan method using all-lines visible argonion laser, up to MW/cm2 intensity level. In Mg-doped congruent and stoichiometric crystals with Mg concentrations above threshold a positive change in the refractive index was found, in contrast to all other cases where beam fanning and negative change of the refractive index were observed. The beam distortion in the samples doped above threshold was related to thermal lensing, while below it to the photorefractive effects. It was also shown that for thermal lensing nonlinear absorption plays a dominant role. The Z-scan method was found to be an alternative technique to decide whether the Mg dopant level is above or below the photorefractive threshold. The damage resistance of the Mg doped samples above threshold was higher for the stoichiometric crystal than for the congruent one and increased with the amount of the built-in Mg concentration. © 2004 American Institute of Physics.