We report the synthesis, fabrication and extensive characterization of a visible-blind photodetector based on p-i-n junction GaN nanowire ensembles. The nanowires were grown by plasma-assisted molecular beam epitaxy on an n-doped Si(111) substrate, encapsulated into a spin-on-glass and processed using dry etching and metallization techniques. The detector presents a high peak responsivity of 0.47 A W(-1) at - 1 V. The spectral response of the detector is restricted to the UV range with a UV-to-visible rejection ratio of 2 x 10(2). The dependence on the incident power and the operation speed of the photodetector are discussed.