Egyptologists have digitally recreated the 'primitive machine' ancient Egyptians used to thwart would-be tomb raiders from stealing artefacts from the Great Pyramid.

While the security system has been studied since the early 19th century, this is the first time researchers have used computer models to demonstrate how it actually worked.

The Great Pyramid of Giza is thought to have housed the remains of Pharaoh Khufu – the ruler of Egypt between 2551 BC and 2528 BC, who originally ordered the structure built. Inside, there is a tomb for him, a Queen's Chamber, and a Subterranean Chamber.

As we explained back in 2014:

"There are three known chambers in the Great Pyramid - the base chamber sits on the bedrock and supports the rest of the pyramid, while the upper two chambers are called the Queen's and King's Chambers. Extending from the north and south walls of the Queen's Chamber are two tunnels - about 20 cm by 20 cm - that are blocked off by stone doors. No one knows what these tunnels were originally intended to do, but one theory is that they led to a secret chamber."

According to Mark Lehner, an archaeologist from the US who has been excavating the Great Pyramid for about three decades now, the ancient Egyptians went to great lengths to conceal the pharaoh's tomb to keep grave robbers at bay.

One of the most sophisticated systems – which you can see in the video below (it's much easier to comprehend with visual aids) – was a 'very primitive machine' that held massive stone blocks up inside the pyramid's walls until Khufu's body was finally laid to rest.

Scientists recreated the device as part of an upcoming episode of the Science Channel's series Unearthedand you can see it in action in the trailer below:

Basically, inside the walls of the pyramid, massive stone blocks were held up in the ceiling and guided by grooves carved into the walls. When Khufu was finally placed inside the tomb, these massive blocks were dropped down into place, sealing off the tunnel.

This very simplistic system offered a great barrier for would-be tomb raiders, though it might not have worked for very long, because Lehner thinks the tomb was sacked sometime between Khufu's death in 2528 BC and 2134 BC when the 'Old Kingdom' of Egypt collapsed.

Despite this, archaeologists think understanding the security system might lead them to previously undiscovered chambers inside the pyramid. In fact, some researchers, like Zahi Hawass – Egypt's former antiquities minister – think that Khufu's tomb is actually still hidden inside, and all of the previously found tombs and tunnels are merely tricks.

"I really believe that Cheops' [another name for Khufu] chamber is not discovered yet, and all three chambers were just to deceive the thieves, and the treasures of Khufu [are] still hidden inside the Great Pyramid," Hawass told Live Science's Owen Jarus back in 2013.

Khufu isn't the only ancient Egyptian ruler who might have hidden tunnels or tombs hidden near where he was buried. Back in March, researchers studying King Tut's tomb found evidence that suggests that there might be hidden passageways behind the walls where his sarcophagus was found, though the investigation is still underway as we speak.