Structural stability and electronic properties of bare and hydrogenated GaP nanowires in zinc-blende and wurtzite phases have been investigated using first-principles calculations based on density functional theory. It is determined that relaxation of the hydrogenated GaP nanowires is very small compared to that of their bare ones. The wurtzite structural hydrogenated GaP nanowires are found more stable than the zinc-blende structural ones by cohesive energy calculations. It is obtained that all the bare and hydrogenated GaP nanowires in zinc-blende and wurtzite phases considered in this work have semiconductor characteristics. The confinement effect, by which the energy gaps are increased with the decrease of the diameter, is demonstrated for the hydrogenated GaP nanowires in both zinc-blende and wurtzite phases. In contrast to the hydrogenated wurtzite GaP nanowires, the hydrogenated zinc-blende ones are found direct band gap materials for diameters in the range of similar to 9 < d(f) < similar to 21 angstrom. (C) 2015 Elsevier B.V. All rights reserved.