Former US Ambassador to the UN Nikki Haley gets a tour of a Hamas terror tunnel, June 8, 2017. (U.S. Embassy/Matty Stern)

IDF had to build an elevator to allow soldiers to reach the tunnel that was 22 stories underground.

The Hamas terror tunnel that was discovered last month under the Gaza-Israel border was the deepest yet, plunging 22 stories underground, the IDF said on Thursday.

Hamas starts the tunnels in civilian homes in Gaza neighborhoods near the border with Israel in order to hide their activity. This particular tunnel from the town of Khan Yunis is more than 2 kilometers (1.2 miles) long and had already extended under the border fence.

The tunnels are designed to get heavily armed Hamas terrorists into Israel, where their stated goal is to surprise both IDF soldiers and Israeli civilians, kill as many people as possible, and kidnap victims who would be dragged back through the tunnels to be held as hostages by the Iran-backed terror group.

The tunnel discovered by the IDF in October using new technology is the deepest tunnel ever dug by Hamas, 74 meters (242 feet) underground – the equivalent of a 22-story building.

It was so deep that once the IDF excavated a shaft deep enough to reach the reinforced concrete tunnel, they had to build an elevator to allow soldiers to descend into it.

The tunnel was found using new detection technology in the security barrier that is being completed along the entire 65-kilometer length of the Gaza Israel border and proves the IDF’s ability to detect activity at great depths.

“For comparison, the deepest Hezbollah tunnel discovered was 80 meters. It does show a significant upscale in time and resources into these tunnel projects. [Hamas is] testing the new barrier already,” tweeted the Israeli private intelligence company Aurora Intel.

Two years ago the IDF discovered that the Hezbollah terror group in Lebanon had taken a lesson from Hamas and constructed similar attack tunnels under the Lebanon-Israel border with the same goal: kill as many Israelis as possible and kidnap hostages.

When the latest Gaza tunnel was found in October, the IDF warned Hamas of the consequences.

“This is a violation of Israeli sovereignty, an attempt to terrorize our civilians & an abuse of international humanitarian aid. We hold Hamas accountable and stand prepared,” the IDF said.