  The planet Mercury possesses a small but highly dynamic magnetosphere in
which the role and dynamics of electrons are still largely unknown. We aim at
modeling the global dynamics of solar wind electrons impinging on Mercury's
magnetosphere. Particular relevance is given to local acceleration processes
and the global circulation patterns. The goals of this work are pursued by
means of three-dimensional, fully kinetic particle-in-cell simulations modeling
the interaction of the solar wind with the Hermean magnetosphere. This method
allows a self-consistent representation of the plasma dynamics from the large
planetary scale down to the electron kinetic scale. Numerical simulations are
carried out using two different solar wind conditions: purely northward or
purely southward interplanetary magnetic field direction. We find a high plasma
current (of the order of few $\mu$A/m2) flowing at the magnetospheric
boundaries (bow shock and magnetopause) dominated by electrons. This current is
driven by the small-scale electron physics resolved in our model. Furthermore,
we observe strong electron acceleration up to tens of keV as a consequence of
magnetic reconnection when the interplanetary magnetic field is directed
southward. Such energetic electrons are partially trapped in the dipolar
magnetic field of the planet mainly at nightside. Finally, by studying the
distribution of electrons in our simulations along Mariner10 and BepiColombo
first-Mercury-flyby trajectories, we propose that both spacecraft observed this
energetic quasi-trapped electron population around closest approach.
