We present the results of a BeppoSAX observation of the Z source GX 349+2 c
overing the energy range 0.1-200 keV. The presence of flares in the light c
urve indicates that the source was in the flaring branch during the BeppoSA
X observation. We accumulated energy spectra separately for the nonflaring
intervals and for the flares. In both cases, the continuum is well describe
d by a soft blackbody (kT(BB) similar to 0.5 keV) and a Comptonized spectru
m corresponding to electron temperature kT(e) similar to 2.7 keV, optical d
epth tau similar to 10 (for a spherical geometry), and seed-photon temperat
ure kT(w) similar to 1 keV. All temperatures tend to increase during the fl
ares. In the nonflaring emission, a hard tail dominates the spectrum above
30 keV. This can be fit by a power law with photon index similar to2, contr
ibuting similar to2% of the total source luminosity over the BeppoSAX energ
y range. A comparison with hard tails that are detected in some soft states
of black hole binaries suggests that a similar mechanism could originate t
hese components in black hole and neutron star systems.