A beam of super-thermal, hot electrons was injected into maxwellian plasma with a density gradient along a magnetic field line. 1.5D particle-in-cell simulations were carried out which established that the EM emission is produced by the perpendicular component of the beam injection momentum. The beam has a positive slope in the distribution function in perpendicular momentum phase space, which is the characteristic feature of a cyclotron maser. The cyclotron maser in the overdense plasma generates emission at the electron cyclotron frequency. The frequencies of generated waves were too low to propagate away from the injection region, hence the wavelet transform shows a pulsating wave generation and decay process. The intensity pulsation frequency is twice the relativistic cyclotron frequency. Eventually, a stable wave packet formed and could mode couple on the density gradient to reach frequencies of the order of the plasma frequency, that allowed for propagation. The emitted wave is likely to be a z-mode wave. The total electromagnetic energy generated is of the order of 0.1% of the initial beam kinetic energy. The proposed mechanism is of relevance to solar type III radio bursts, as well as other situations, when the injected electron beam has a non-zero perpendicular momentum, e.g. magnetron.