Assuming that giant planets are formed in thin protoplanetary discs , a “ 3-D ” system – i.e . a planetary system composed of two ( or more ) planets , whose orbital planes have large values of mutual inclination – can form , provided that the mutual inclination is excited by some dynamical mechanism . Resonant interactions and close planetary encounters are thought to be the primary inclination-excitation mechanisms , resulting in a resonant or non-resonant system , respectively . If by the end of planet formation the system is dynamically “ hot ” , then a phase of planet-planet scattering can be expected ; however , this need not be the case in every system . Here we propose an alternative formation scenario , starting from a system composed of three giant planets in a nearly co-planar configuration . As was recently shown for the case of the solar system , planetary migration in the gas disc ( Type II migration ) can force the planets to become trapped in a multiply-resonant state ( similar to the Laplace resonance in the Galilean satellites ) . We simulate this process , assuming different values for the planetary masses and mass ratios . We show that , such a triple resonance generally becomes unstable , as the resonance excites the eccentricities of all planets , and planet-planet scattering sets in . One of the three planets is typically ejected from the system , leaving behind a dynamically “ hot ” ( but stable ) two-planets configuration . The resulting two-planet systems typically have large values of semi-major axes ratio ( \alpha = a _ { 1 } / a _ { 2 } < 0.3 ) , while the mutual inclination can be as high as 70 ^ { \circ } , with a median of \sim 30 ^ { \circ } . These values are quite close to the ones recently obtained for the \upsilon -Andromedae system . A small fraction of our two-planet systems ( \sim 5 \% ) ends up in the stability zone of the Kozai resonance . In a few cases , the triple resonance can remain stable for long times and a “ 3-D ” system can form by resonant excitation of the orbital inclinations ; such a three-planet system could be stable if enough eccentricity damping is exerted on the planets . Finally , in the single-planet resulting systems , which are formed when two planets are ejected from the system , the inclination of the planet ’ s orbital plane with respect to the initial invariant plane – presumably the plane perpendicular to the star ’ s spin axis – can be as large as \sim 40 ^ { \circ } .