Laboratory experiments have shown that the UV photo-irradiation of low-temperature ices of astrophysical interest leads to the formation of organic molecules, including molecules important for biology such as amino acids, quinones, and amphiphiles. When pyrimidine is introduced in these ices, the products of irradiation include the nucleobases uracil, cytosine, and thymine, the informational sub-units of DNA and RNA, as well as some of their isomers. The formation of these compounds, which has been studied both experimentally and theoretically, requires a succession of additions of OH, NH 2 , and CH 3 groups to pyrimidine. Results show that H 2 O ice plays key roles in the formation of the nucleobases, as an oxidant, as a matrix in which reactions can take place, and as a catalyst that assists proton abstraction from intermiediate compounds. As H 2 O is also the most abundant icy component in most cold astrophysical environments, it probably plays the same roles in space for the formation of biologically relevant compounds. Results also show that although the formation of uracil and cytosine from pyrimidine in ices is fairly straightforward, the formation of thymine is not. This is mostly due to the fact that methylation is a limiting step for its formation, particularly in H 2 O-rich ices, where methylation must competes with oxidation. The relative inefficiency of the abiotic formation of thymine to that of uracil and cytosine, coupled with the fact that thymine has not been detected in meteorites are not inconsistent with the RNA world hypothesis. Indeed, a lack of abiotically produced thymine delivered to the early Earth may have forced the choice for an RNA world, in which only uracil and cytosine are needed, but not thymine.