X-ray scattering techniques have been used to study the structures of two crystals of Rb1-x(NH4)xH2PO4 with x≃0.2, near to the boundary between ferroelectric and "structural-glass" behavior at low temperature. Below about 83K, both crystals develop shortrange incommensurate correlations with a wavevector q≃0.13 a* which are presumably related to the glass properties. On cooling below 70 K, the crystal with the slightly larger NH4+ concentration x, develops the ferroelectric structure in a small fraction of the crystal, while the bulk of the crystal retains the tetragonal structure. The other crystal transforms almost wholly to the ferroelectric phase. The transition to the ferroelectric structure shows considerable hysteresis on heating and cooling, and is spread over about 20 K. The transition is certainly of first order, and the spread in temperature may arise from concentration fluctuations. These results and the structure of the incommensurate modulations are compared with the predictions of a theoretical model for this system. © 1987 Springer-Verlag.