An instability among the giant planets' orbits can match many aspects of the Solar System's current orbital architecture. We explore the possibility that this dynamical instability was triggered by the close passage of a star or substellar object during the Sun's embedded cluster phase. We run N-body simulations starting with the giant planets in a resonant chain and an outer planetesimal disk, with a wide-enough planet-disk separation to preserve the planets' orbital stability for
>100 Myr. We subject the system to a single flyby, testing a wide range in flyby mass, velocity and closest approach distance. We find a variety of outcomes, from flybys that over-excite the system (or strip the planets entirely) to flybys too weak to perturb the planets at all. An intermediate range of flybys triggers a dynamical instability that matches the present-day Solar System. Successful simulations -- that match the giant planets' orbits without over-exciting the cold classical Kuiper belt -- are characterized by the flyby of a substellar object (
3−30MJup) passing within 20 au of the Sun. We performed Monte Carlo simulations of the Sun's birth cluster phase, parameterized by the product of the stellar density
η and the cluster lifetime
T. The balance between under- and over-excitation of the young Solar System is at
ηT≈5×104~Myr pc
−3, in a range consistent with previous work. We find a probability of
∼1% that the Solar System's dynamical instability was triggered by a substellar flyby. The probability increases to
∼5% if the occurrence rate of free-floating planets and low-mass brown dwarfs is modestly higher than predicted by standard stellar initial mass functions.