We use 1.5 dimensional particle-in-cell plasma simulations to study the int
eraction of a relativistic, strongly magnetized wind with an ambient medium
. Such an interaction is a plausible mechanism that leads to generation of
cosmological gamma-ray bursts. We confirm the idea of Meszaros & Rees that
an essential part (about 20%) of the energy that is lost by the wind in the
process of its deceleration may be transferred to high-energy electrons an
d then to high-frequency (X-ray and gamma-ray) emission. We show that in th
e wind frame the spectrum of electrons that are accelerated at the wind fro
nt and move ahead of the front is nearly a two-dimensional relativistic Max
wellian with a relativistic temperature T = m(e)c(2)Gamma(T)/k similar or e
qual to 6 x 10(9)Gamma(T) K, where Gamma(T) is equal to 200 Gamma(0), with
the accuracy of similar to 20%, and Gamma(0) is the Lorentz factor of the w
ind, Gamma(0) greater than or similar to 10(2) for winds outflowing from co
smological gamma-ray bursters. Our simulations point to an existence of a h
igh-energy tail of accelerated electrons with a Lorentz factor of more than
similar to 700 Gamma(0). Large-amplitude electromagnetic waves are generat
ed by the oscillating currents at the wind front. The mean held of these wa
ves ahead of the wind front is an order of magnitude less than the magnetic
held of the wind. High-energy electrons that are accelerated at the wind f
ront and injected into the region ahead of the front generate synchro-Compt
on radiation in the fields of large-amplitude electromagnetic waves. This r
adiation closely resembles synchrotron radiation and can reproduce the nont
hermal radiation of gamma-ray bursts observed in the Ginga and BATSE ranges
(from a few keV to a few MeV). Synchrotron photons that are generated in t
he vicinity of the wind front may be responsible for the radiation of gamma
-ray bursts in the EGRET energy range above a few ten MeV. The spectrum of
gamma-ray bursts in high-energy gamma-rays may extend, in principle, up to
the maximum energy of the accelerated electrons, which is about 10(13)(Gamm
a(0)/10(2))(2) eV in the frame of the gamma-ray burster.