Nanofibres, optical fibres narrower than the wavelength of light, degrade in hours on exposure to air. We show that encapsulation in hydrophobic silica aerogel (refractive index 1.05) provides protection and stability (over 2 months) without sacrificing low attenuation, strong confinement and accessible evanescent field. The measured attenuation was 0.03 dB/mm, over 10 lower than reported with other encapsulants. This enables many nanofibre applications based on their extreme small size and strong external evanescent field, such as optical sensors, nonlinear optics, nanofibre circuits and high-Q resonators. The aerogel is more than a waterproof box, it is a completely-compatible gas-permeable material in intimate contact with the nanofibre and hydrophobic on both the macroscopic and molecular scales. Its benefits are illustrated by experiments on gas sensing (exploiting the aerogel's porosity) and supercontinuum generation (exploiting its ultra-low index). 2011 Optical Society of America.