We report on the realization of a capacitive dilatometer, designed for high-resolution measurements of length changes of a material for temperatures 1.4 K ≤ T ≤ 300 K and hydrostatic pressure P ≤ 250 MPa. Helium ( 4 He) is used as a pressure-transmitting medium, ensuring hydrostatic-pressure conditions. Special emphasis has been given to guarantee, to a good approximation, constant-pressure conditions during temperature sweeps. The performance of the dilatometer is demonstrated by measurements of the coefficient of thermal expansion at pressures P 0.1 MPa (ambient pressure) and 104 MPa on a single crystal of azurite, Cu 3 (CO 3 ) 2 (OH) 2 , a quasi-one-dimensional spin S = 1/2 Heisenberg antiferromagnet. The results indicate a strong effect of pressure on the magnetic interactions in this system.