A coherent mechanism is developed for the preferential acceleration of relativistic heavy solar and galactic cosmic ray nuclei. In this mechanism bunches of high density relativistic electrons serve as vehicles for the acceleration of trapped positive ions over short distances to relativistic velocities. The pinch effect and the seeding of a number of stripped ions will help to stabilize the electron beam, which might break into small, bunches. These positive ions would be trapped electrostatically in the beam's very deep potential well and would necessarily acquire the same velocity of the electrons on acceleration. The ions are actually accelerated by the internal coherent electric field of the electrons. For a perfect coherent mechanism, the radius of the beam L should be L< λ where λ is the plasma wavelength. In addition, these bunches of high density electrons may perform head on collisions with ions. Every ion of mass m2 would obtain a very high energy W = m2 c2 γ2. This mechanism can give rise to energies in the TeV range and can induce fission reactions. Gamma rays can be produced between the accelerated nuclei and the ambient plasma in the solar or stellar atmospheres or in interstellar and intergalactic mediums.The main principle of this mechanism has been applied in electron-ring accelerators 435