At the end of the movie, Jurassic Park, the lead actors are in an enclosed space, surrounded by menacing velociraptors. It looks like their time is up, until suddenly, out of nowhere, a T-Rex suddenly appears and attacks the velociraptors, allowing our heroes to escape to safety.
That plot twist is called a Deus Ex Machina, which is Latin for God From The Machine…