  We report the discovery of a compact group of galaxies, CGG-z5, at z~5.2 in
the EGS field covered by the JWST/CEERS survey. CGG-z5 was selected as the
highest overdensity of galaxies at z>2 in recent JWST public surveys and it
consists of six candidate members lying within a projected area of
$1.5"\times3"$ (10$\times$20~kpc$^2$). All group members are HST/F435W and
HST/F606W dropouts while securely detected in the JWST/NIRCam bands, yielding a
narrow range of robust photometric redshifts $5.0<z<5.3$. The most massive
galaxy in the group has a stellar mass log$(M_{*}/M_{\odot})\approx9.8$, while
the rest are low-mass satellites (log$(M_{*}/M_{\odot})\approx8.4-9.2$). While
several group members were already detected in the HST and IRAC bands, the low
stellar masses and the compactness of the structure required the sensitivity
and resolution of JWST for its identification. To assess the nature and
evolutionary path of CGG-z5, we searched for similar compact structures in the
\textsc{Eagle} simulations and followed their evolution with time. We find that
all the identified structures merge into a single galaxy by z=3 and form a
massive galaxy (log$(M_{*}/M_{\odot})>11$) at z~1. This implies that CGG-z5
could be a "proto-massive galaxy" captured during a short-lived phase of
massive galaxy formation.
