Solid state Si-29 and P-31 MAS NMR have been used to investigate the microstructural changes occurring in phosphosilicate gels during their conversion from a gel to the corresponding gel-derived glasses by heating. The studied gels have the molar compositions 10P(2)O(5). 90SiO(2) and 30P(2)O(5). 70SiO(2). It was found that the dried gels (100 degreesC) have very similar structures formed by a siloxane framework containing silanol groups and including trapped molecules of orthophosphoric acid along with a very small amount of pyrophosphoric acid. In spite of this initial similarity further heating causes markedly different structural rearrangements of their glassy matrices. Namely, the co-polymerisation of phosphate and silicate tetrahedra takes place at 300 degreesC for the gel with the higher phosphorus content whereas this occurs only after heat treatment for 30 minutes at 400 degreesC for the gel with the lower phosphorus content. Moreover, the presence of six-coordinated silicon in the glassy matrix of the 30P(2)O(5). 70SiO(2) gel has been observed. The different evolution of the investigated gel microstructures mirrors their different crystallization behaviour: 10P(2)O(5). 90SiO(2) keeps its amorphous nature up to 1000 degreesC while for 30P(2)O(5). 70SiO(2) crystallization starts after heat treatment for 30 minutes at 400 degreesC.