  In the latest Gaia third data release one can find extremely small proper
motion components for the star HD 7977. This, together with the radial velocity
measurement lead to the conclusion that this star passed very close to the Sun
in the recent past. Such a very close approach of a one solar mass star must
result in noticeable changes in the motion of all Solar System bodies,
especially those on less tight orbits, namely long-period comets (LPCs) and
Kuiper belt objects. We estimate and present these effects. Our current
knowledge on the stellar surroundings of the Sun found in the latest Gaia
catalogues allowed us to perform numerical integrations and prepare a list of
potential stellar perturbers of LPCs. We use this list, made available in the
StePPeD database. To study the past motion of LPCs under the simultaneous
action of the Galactic potential and passing stars, we use precise original
cometary orbits taken from the current CODE catalogue. We examine the
reliability of the extremely small proper motion of HD 7977 concluding that
this star can be an unresolved binary but according to the astrometry covering
more than a century, the current Gaia results cannot be ruled out. We present
the parameters of a very close passage of this star near the Sun. We also show
examples of the strong influence of this passage on the past motion of some
LPCs. We also discuss the possible influence of this perturber on other Solar
System bodies. It is possible that 2.47 Myr ago the one solar mass star HD 7977
passed as close as one thousand au from the Sun. Such an event constitutes a
kind of dynamical horizon for all studies of the past Solar System bodies'
dynamics.
