Observations of hard X-ray (HXR)/γ-ray continuum and γ-ray lines produced by energetic electrons and ions, respectively, colliding with the solar atmosphere, have shown that large solar flares can accelerate ions up to many GeV and electrons up to hundreds of MeV. Solar energetic particles (SEPs) are observed by spacecraft near 1 AU and by ground-based instrumentation to extend up to similar energies, but it appears that a different acceleration process, one associated with fast Coronal Mass Ejections (CMEs) is responsible. Much weaker SEP events are observed that are generally rich in electrons, 3He, and heavy elements. The energetic particles in these events appear to be similar to those accelerated in flares. The Ramaty High Energy Solar Spectroscopic Imager (RHESSI) mission provides high-resolution spectroscopy and imaging of flare HXRs and γ-rays. The observations of the location, energy spectra, and composition of the flare accelerated energetic particles at the Sun strongly imply that the acceleration is closely related to the magnetic reconnection that releases the energy in solar flares. Here preliminary comparisons of the RHESSI observations with observations of both energetic electrons and ions near 1 AU are reviewed, and the implications for the particle acceleration and escape processes are discussed.