Abstract. We report on results of two BeppoSAX observations of the Z source GX 17+2. In both cases the source is in the horizontal branch of the colour-intensity diagram. The persistent continuum can be fit by two-component models consisting of a blackbody plus a Comptonization spectrum. With one of these models, two solutions for the blackbody temperature of both the observed and seed photons for Comptonization are equally accepted by the data. In the first observation, when the source is on the left part of the horizontal branch, we observe a hard tail extending up to 120 keV, while in the second observation, when the source moves towards right in the same branch, the tail is no longer detected. The hard ( > ∼ 30 keV) X-ray emission can be modeled either by a simple power-law with photon index Γ ∼ 2.8, or assuming Comptonization of ∼1 keV soft photons off a hybrid thermal plus non-thermal electron plasma. The spectral index of the non-thermal injected electrons is p ∼ 1.7. The observation of hard X-ray emission only in the left part of the horizontal branch could be indicative of the presence of a threshold in the accretion rate above which the hard tail disappears. An emission line at 6.7 keV with equivalent width ∼ 30 eV is also found in both observations. We discuss these results and their physical implications.