Two proton events (>100 MeV; GOES, ACS SPI) associated with weak flares (C1.2, GOES class) in the soft X-ray range that occurred on November 26, 2011, and September 29, 2013, are analyzed. These events were accompanied by significant fluxes of relativistic electrons (>1 MeV; SOHO EPHIN) in the interplanetary space. The time profiles of these protons and electron fluxes were similar during the growth phase, which suggested a common mechanism of their acceleration and propagation. The gradual increase in the flux intensities, in our opinion, shows a prolonged and gradual injection of particles into the interplanetary space, which may be the result of prolonged acceleration or capture. Since prolonged electron capture is unlikely, it is most probable that a prolonged acceleration took place. The prolonged proton acceleration is realized at the post-eruptive phase of solar flares or shock-wave coronal mass ejection. According to the existing theoretical concepts, the acceleration of solar electrons to ~10 MeV by a shock wave is hardly possible. In this case, relativistic electrons and protons were apparently accelerated in the post-eruptive phase of solar flares, where the stochastic acceleration by magnetohydrodynamic turbulence is considered the most probable mechanism.