In this paper the role of particle beams in the generation of a close spatial and temporal correlation between hard X-ray (HXR) energy and Hα line emission bursts in the solar flare of 2004 July 25 is discussed. The light curves in the HXR emission and Hα line reveal that the pre-flare and main flare events are correlated with the variations of line-of-sight (LOS) magnetic flux. The HXR emission shows three main bursts during the main flare phase, which are accompanied by Hα intensity increases. The latter appear in 10 locations (kernels) at different times in succession; the kernel locations are associated with strong magnetic sources situated on the opposite side from the magnetic neutral line (MNL). The appearance of Hα kernels in the pre-flare event and those at the start of the main event ia correlated very closely (within a few seconds) with the HXR emission observed by the Reuven Ramaty High-Energy Solar Spectroscopic Imager (RHESSI) (HXR+Hα kernels), while the appearance of some others, not associated with HXR emission, was delayed by tens of seconds. Electron-beam parameters were derived from the RHESSI spectra in which the observed HXR photon flux was corrected for the self-induced electric field effect. Possible implications of this electric field on the production of transient magnetic fields observed during the flare are discussed. The Hα emission observed during the first burst was simulated in a hydrodynamic atmosphere for 5 levels plus a continuum hydrogen atom with the full non-local thermodynamic equilibrium (non-LTE) approach combining radiative, thermal and non-thermal excitation and ionization by an electron beam with the derived parameters. The simulated temporal profiles of Hα emission produced by non-thermal hydrogen excitation revealed a very good fit to the observed ones in the HXR+Hα kernels and 10–20 s delays in the other kernels. This allows us to speculate that Hα emission is caused mainly by electrons in the HXR+Hα kernels and mainly by protons in the others.