Knowledge of intrinsic shape and orientation of galaxy clusters is crucial to understand their formation and evolution. We propose a novel model which uses Bayesian inference to determine the intrinsic form of the hot intracluster medium of galaxy clusters. The method exploits X-ray spectroscopic and photometric data plus measurements of the Sunyaev–Zel’dovich effect (SZe). The gas distribution is modelled with an ellipsoidal parametric profile, which can fit observed X-ray surface brightness and temperature. Comparison with the SZ amplitude fixes the elongation along the line of sight. Finally, Bayesian inference allows us to deproject the measured elongation and the projected ellipticity and to constrain the intrinsic shape and orientation of the cluster. We apply the method to the rich cluster Abell 1689 (A1689), which was targeted by the Chandra and XMM–Newton satellites as well as by several SZe observatories. Observations cover in detail a region ≲1 Mpc. Our analysis favours a mildly triaxial cluster with a minor to major axial ratio of 0.70 ± 0.15, preferentially elongated along the line of sight, as expected for massive lensing clusters. The triaxial structure together with the orientation bias can reconcile X-ray with lensing analyses and supports the view of A1689 as a just slightly overconcentrated massive cluster not so far from hydrostatic equilibrium.