Uniaxiallyp-njunction gallium nitride nanowires have been synthesized via metal-organic chemical vapor deposition method. Nanowires prepared on Si(111) substrates were found to grow perpendicular to the substrate, and the transmission electron microscopy studies demonstrated that the nanowires had singlecrystalline structures with a <0001> growth axis. The parallel assembly of thep-njunction nanowire was prepared on a Si substrate with a thermally grown SiO2layer. The transport studies of horizontal gallium nitride nanowire structures assembled fromp- andn-type materials show that these junctions correspond to well-definedp-njunction diodes. Thep-njunction devices based on GaN nanowires suspended over the electrodes were fabricated and their electrical properties were investigated. The horizontally assembled gallium nitride nanowire diodes suspended over the electrodes exhibited a substantial increase in conductance under UV light exposure. Apart from the selectivity to different light wavelengths, high responsivity and extremely short response time have also been obtained.