After the events of The First Encounter, Sam is seen traveling through space in the SSS Centerprice. Suddenly, something collides with the spaceship, causing it to crash into some mountains in South America, (the original TSE shows that a crate bus piloted by Croteam Bigheads crashed into it by accident, but this cutscene was removed in the HD version, making it unknown if this is still canon). According to NETRICSA, they have crashed in pre-Columbian Mesoamerica.
However, Sam is not trapped; as NETRICSA discovers a backup spaceship that the Sirians placed on Earth in case something happened to the SSS Centerpiece. Portals through different time areas have been placed throughout different time periods across Earth in order to lead to the backup spaceship; a rocket. However, it seems that Mental is aware of the crash and sends more of his alien horde against Sam.
Sam starts his travels through Mesoamerica in order to find the key that leads to the Mesoamerica's portal. After fighting through a few temples, Sam discovers the key; a crystal skull. With this in hand, he enters the ancient city of Teotihuacan while fighting more of Mental's horde. After a travel through the capital city and the challenging “trials” underneath the city, Sam finally manages to get to the teleport. However, it is guarded by the Mayan wind god, Kukulkán, who doesn't recognize Sam and fights him in order for Sam to prove his worth in using the teleporter. Mental's forces attempt to intervene, but Sam manages to best Kukulkan in battle, allowing Sam access to the teleporter.
The teleport sends Sam to Babylon, where he must find the teleporter there. Much like in Mesoamerica, Sam fights through temples and villages to find it. As he makes progress through the Babylonian complex, NETRICSA discovers a very likely location for the teleport; the Tower of Babel. After gaining access by finding the three Tablets of Wisdom scattered in various yards, Sam discovers that the area is guarded by one of Mental's minions. After he kills the creature, he enters the second portal.
Sam appears in a quiet town in medieval Poland, near a large castle that contains a book which has the location of the key to activate the backup spaceship, the Holy Grail. Of course, Sam is attacked by Mental's hordes, who strike with more force than they did before. After reaching the heart of the castle, he finds the book, which leads him to a village on a snowy mountain, which has a lava-filled cavern hidden below. Inside the cave is a teleport that leads him to an ice castle.
Sam travels to the Grand Cathedral, the location of the backup spaceship and the Holy Grail. Mental is unable to destroy the Holy Grail because him and his forces are considered “unholy” by it, so instead he moved it to The Grand Cathedral as a temporary measure. Sam managed to fight through the Corridors of Death and reach the Cathedral. Before he can enter the cathedral, Mordekai the Summoner appears, who was guarding the Grail with his dark magic. After a difficult fight, Sam manages to defeat him and gain access to the Holy Grail, which is located in the Cathedral. He then calls Mental to “confess his sins”, which was actually to make fun of how he managed to demolish Mental's forces to him. Sam then activates the backup spaceship, heads to his original destination, Sirius and its trade routes, while the Bigheads cheer him on.