I was only yesterday rereading my copy of Dr. Vladimir Beletsky's
Essays on the Motion of Celestial Bodies, and one chapter discusses the dynamical consequences of a spiral galaxy such as the Milky Way being disrupted by the gravitational potential of a multi-billion solar mass "dead quasar" moving on a hyperbolic encounter trajectory perpendicular to the galactic plane in one example and a hyperbolic co-planar encounter in the other. The gravitational perturbations - aside from tearing away a substantial number of stars to form a second, smaller galaxy centered on the rogue object - would cause the orbits of just about every planet, asteroid and comet around its stellar primary within the galactic remnants to be modified with potentially horrendous consequences to life-bearing worlds such as Earth. Needless to say, Starfleet dispatching the NCC-1701 Refit on a desperate extragalactic mission (after being equipped with an
Extended Mission Module?

) to intercept the quasar could have made for one
bitchin' hard sci-fi film, although for the life of me I cannot image how Kirk and the gang could have done
anything beyond take notes on the destruction from a safe distance while moaning "Oh, the Humanoidity!".