The famous extreme solar and particle event of 20 January 2005 is analyzed from two perspectives . Firstly , using multi-spectral data , we study temporal , spectral , and spatial features of the main phase of the flare , when the strongest emissions from microwaves up to 200 MeV gamma-rays were observed . Secondly , we relate our results to a long-standing controversy on the origin of solar energetic particles ( SEP ) arriving at Earth , i.e . , acceleration in flares , or shocks ahead of coronal mass ejections ( CMEs ) . Our analysis shows that all electromagnetic emissions from microwaves up to 2.22 MeV line gamma-rays during the main flare phase originated within a compact structure located just above sunspot umbrae . In particular , a huge ( \approx 10 ^ { 5 } sfu ) radio burst with a high frequency maximum at 30 GHz was observed , indicating the presence of a large number of energetic electrons in very strong magnetic fields . Thus , protons and electrons responsible for various flare emissions during its main phase were accelerated within the magnetic field of the active region . The leading , impulsive parts of the ground-level enhancement ( GLE ) , and highest-energy gamma-rays identified with \pi ^ { 0 } -decay emission , are similar and closely correspond in time . The origin of the \pi ^ { 0 } -decay gamma-rays is argued to be the same as that of lower-energy emissions , although this is not proven . On the other hand , we estimate the sky-plane speed of the CME to be 2 000 – 2 600 km s ^ { -1 } , i.e . , high , but of the same order as preceding non-GLE-related CMEs from the same active region . Hence , the flare itself rather than the CME appears to determine the extreme nature of this event . We therefore conclude that the acceleration , at least , to sub-relativistic energies , of electrons and protons , responsible for both the major flare emissions and the leading spike of SEP/GLE by 07 UT , are likely to have occurred nearly simultaneously within the flare region . However , our analysis does not rule out a probable contribution from particles accelerated in the CME-driven shock for the leading GLE spike , which seemed to dominate at later stages of the SEP event .