Water is the third most abundant molecule in the universe, after hydrogen and carbon monoxide, but its origins have remained obscure