We report a high-resolution synchrotron X-ray powder diffraction study on (KxNa1-x)MgF3 perovskites at high pressures and temperatures. The crystal structure of the perovskite transforms reversibly from orthorhombic (Pbnm) to tetragonal (P4/mbm) to cubic (Pm3m) with change of pressure and temperature and also with K+ concentration. The tilt angle of the MgF6 octahedral framework decreases continually and the octahedral Mg-F bond length increases slightly with increasing temperature. Correspondingly, at high pressures, the tilting angles increase slightly and the shortening of the Mg-F bond length is the dominant compression mechanism. Both octahedral tilting and bond length decrease with increasing K+ participation. We have monitored superlattice diffraction associated with in-phase and antiphase octahedral tiltings in situ and in real time in P-T-X space. The intensities of the superlattice diffraction peaks decrease quickly toward zero with increasing temperature and/or K+ concentration. Meanwhile, the doublet and triplet diffraction peaks, which directly reflect the dimensional differences of the a, b, and c axes, converge continuously and finally coalesce into single peaks as the temperature reaches T-c and/or the K+ concentration reaches X-c, The transition temperatures are plotted as a function of pressure (T-c-P), and as a function of composition (T-c-X), The structural phase transitions in (K,Na) MgF3 perovskites are driven by two order parameters, which are represented by the octahedral tiltings theta = (phi(x)(-), phi(y)(-) 0) and phi = (0, 0, phi(z)(+)). The strong coupling between these two order parameters drives the end-member NaMgF3 perovskite to transform directly from the orthorhombic to cubic phase at temperature T-c=1038 K. Such direct orthorhombic-cubic phase transition remains unbroken even at pressures up to 10 GPa, However, with increasing incorporation of larger K+ cations into the crystal structure, the interaction between the octahedral tiltings was successively decoupled and the purely intermediate tetragonal phase thus appeared around X similar to 35%, The crystal structure of the (KxNa1-x) MgF3 perovskites eventually becomes cubic at X similar to 40%. (C) 1998 Academic Press.