We present the results of a BeppoSAX observation of the Z source GX 349+2 covering the energy range 0.1–200 keV . The presence of flares in the light curve indicates that the source was in the flaring branch during the BeppoSAX observation . We accumulated energy spectra separately for the non-flaring intervals and the flares . In both cases the continuum is well described by a soft blackbody ( kT _ { BB } \sim 0.5 keV ) and a Comptonized spectrum corresponding to an electron temperature of kT _ { e } \sim 2.7 keV , optical depth \tau \sim 10 ( for a spherical geometry ) , and seed photon temperature of kT _ { W } \sim 1 keV . All temperatures tend to increase during the flares . In the non-flaring emission a hard tail dominates the spectrum above 30 keV . This can be fit by a power law with photon index \sim 2 , contributing \sim 2 \% of the total source luminosity over the BeppoSAX energy range . A comparison with hard tails detected in some soft states of black hole binaries suggests that a similar mechanism could originate these components in black hole and neutron star systems .