Described herein are methods of preventing, arresting progression of or ameliorating vision loss and other conditions associated with retinitis pigmentosa and x-linked retinitis pigmentosa in a subject. The methods include administering to a subject an effective concentration of a composition comprising a recombinant adeno-associated virus (AAV) carrying a nucleic acid sequence encoding a normal retinitis pigmentosa GTPase regulator (RPGR gene), or fragment thereof, under the control of regulatory sequences which express the product of the gene in the photoreceptor cells of the subject, and a pharmaceutically acceptable carrier.