ABSTRACT Observations relating the characteristics of electrons seen near Earth (solar energetic particles [SEPs]) and those producing flare radiation show that in certain (prompt) events the origin of both populations appears to be the flare site, which shows strong correlation between the number and spectral index of SEP and hard X-ray radiating electrons, but in others (delayed), which are associated with fast coronal mass ejections (CMEs), this relation is complex and SEPs tend to be harder. Prompt event spectral relation disagrees with that expected in thick or thin target models. We show that using a more accurate treatment of the transport of the accelerated electrons to the footpoints and to Earth can account for this discrepancy. Our results are consistent with those found by Chen & Petrosian for two flares using nonparametric inversion methods, according to which we have weak diffusion conditions, and trapping mediated by magnetic field convergence. The weaker correlations and harder spectra of delayed events can come about by reacceleration of electrons in the CME shock environment. We describe under what conditions such a hardening can be achieved. Using this (acceleration at the flare and reacceleration in the CME) scenario, we show that we can describe the similar dichotomy that exists between the so-called impulsive, highly enriched (3He and heavy ions), and softer SEP events and stronger, more gradual SEP events with near-normal ionic abundances and harder spectra. These methods can be used to distinguish the acceleration mechanisms and to constrain their characteristics.