In the present work we show that a suitable high temperature ammonia treatment allows for the conversion of single-walled TiO 2 nanotube arrays not only to a N-doped photoactive anatase material (which is already well established), but even further into fully functional titanium nitride (TiN) tubular structures that exhibit semimetallic conductivity.Several functional features have made TiO 2 one of the most studied compounds in materials science over the past few decades. This unique role is, to a large extent, due to its semiconductive nature, which is key to the successful use of the material in photocatalysis 1-3 and solar cells. 4,5 In these applications, the optical propertiesnamely, a band-gap of 3.0-3.2 eV and the energetic location of the band edge positions relative to the redox potential of the environment -are crucial. TiO 2 has the potential for an even wider range of applications including as an electrode for Li-intercalation, 6 a support in methanol fuel cells 7 or in supercapacitors, 8 but such uses as an electrode material are hampered by the moderate electron conductivity of TiO 2 . 9 In this context, a conversion of the material to a semimetallic nitride 10-12 may be highly promising because, in such electrode configurations, electron transport through the material to the back contact is of utmost importance for the performance of the devices. A fact common to photoelectrochemical and electrode applications is that nanostructured electrodes are beneficial, as they provide a large surface area for adsorption, reaction, and intercalation processes. Nanostructured electrodes are classically prepared from TiO 2 nanoparticles compacted onto a metallic or transparent-conducting-oxide (TCO) back contact. However, in recent years 1D nanostructures have attracted wider interest, as their morphology provides defined geometries that allow for ideal ion and charge transport pathways, e.g. directional electron transport to the back contact and highly defined ion diffusion pathways. One of the most straightforward approaches used to create defined 3D titania electrodes is the formation of ordered TiO 2 nanotube arrays via the self-ordering anodic oxidation of Ti metal sheets. 13,14 In order to improve the optical and electronic properties of nanostructured TiO 2 electrodes, a large amount of effort in past and current research has been dedicated to doping, 15,16 or band-gap engineering of the materials using a wide range of transition metals such as vanadium, cerium, manganese and nickel, 17-21 or nonmetals such as C, N and S. 15,16,22,23 At present, the most successful approach for varying the optical and electrical properties remains N-doping, which can be conducted using various techniques. 24 At low to medium nitrogen concentrations, most reports describe the formation of N-substitutional states close to the valence band of TiO 2 . This has been successfully used to narrow the optical absorption edge and cause the well-established activation of TiO 2 in the visible range of the optical spectrum.Nitrogen...