The controlled assembly of nanowires is a key challenge in the development of a range of bottom-up devices. Recent advances in the post-growth assembly of nanowires and carbon nanotubes have led to alignment ratios of 80-95% for a misalignment angle of ±5° (refs 5, 12, , 14) and allowed various multiwire devices to be fabricated. However, these methods still create a significant number of crossing defects, which restricts the development of device arrays and circuits based on single nanowires/nanotubes. Here, we show that a nanocombing assembly technique, in which nanowires are anchored to defined areas of a surface and then drawn out over chemically distinct regions of the surface, can yield arrays with greater than 98.5% of the nanowires aligned to within ±1° of the combing direction. The arrays have a crossing defect density of ∼0.04 nanowires per µm and efficient end registration at the anchoring/combing interface. With this technique, arrays of single-nanowire devices are tiled over chips and shown to have reproducible electronic properties. We also show that nanocombing can be used for laterally deterministic assembly, to align ultralong (millimetre-scale) nanowires to within ±1° and to assemble suspended and crossed nanowire arrays.