The commissioning and operation of apparatus for neutron diffraction at simultaneous high temperatures and pressures is reported. The basic design is based on the Paris-Edinburgh cell using opposed anvils, with internal heating. Temperature is measured using neutron radiography. The apparatus has been shown in both on-line and off-line tests to operate to a pressure of 7 GPa and temperature of 1700°C. The apparatus has been used in a neutron diffraction study of the crystal structure of deuterated brucite, and results for 520°C and 5.15 GPa are presented. The diffraction data that can be obtained from the apparatus are of comparable quality to previous high-pressure studies at ambient temperatures, and are clearly good enough for Rietveld refinement analysis to give structural data of reasonable quality.