When the protective layer is formed so as to cover the side surfaces of the n-type GaN layer, the light-emitting layer, and the p-type GaN layer, the protective layer is preferably formed of an insulating material, such as SiO2 or Al2O3, in order to prevent current leakage between the p-type GaN layer and the n-type GaN layer.