To shed light on the mechanism responsible for the weak ferromagnetism in undoped wide band gap oxides, we carry out a comparative study on ZnO thin films prepared using both sol-gel and molecular beam epitaxy (MBE) methods. Compared with the MBE samples, the sol-gel derived samples show much stronger room temperature ferromagnetism with a magnetic signal persisting up to ∼740 K, and this ferromagnetic order coexists with a high density of defects in the form of zinc vacancies. The donor-acceptor pairs associated with the zinc vacancies also cause a characteristic orange-red photoluminescence in the sol-gel films. Furthermore, the strong correlation between the ferromagnetism and the zinc vacancies is confirmed by our first-principles density functional theory calculations, and electronic band alteration as a result of defect engineering is proposed to play the critical role in stabilizing the long-range ferromagnetism