JERUSALEM — The Israeli military said Sunday it destroyed an attack tunnel built by the Hamas militant group that stretched from the Gaza Strip through Israel and into Egypt, and that ran past Israeli military posts as well as gas and fuel pipelines.

Military spokesman Lt. Col. Jonathan Conricus said the milelong tunnel ran underneath the Kerem Shalom border crossing, Gaza’s main point of entry for humanitarian aid.

He said Israeli jets struck part of the tunnel and a new set of sophisticated “tools” destroyed the rest. Conricus said forces had been monitoring its construction for some time and an imminent attack on Israelis was possible. The crossing has been closed until further notice.

Israel has made neutralizing the tunnel threat a top priority since 2014, when Hamas militants on several occasions made their way into Israel. Although they did not manage to reach civilian areas, the infiltrations caught Israel off guard, killing five soldiers in one attack, and terrified the local population.

Sunday’s operation marked the third such tunnel Israel has destroyed over the past two months. Conricus said this did not mark “more of the same” since it involved the most advanced technological means Israel has deployed.

“(We) now hold a method, an organized system to destroy terror tunnels dug into Israel,” he said. “This is a key mission for us and our intention is to allow quiet and to deter Hamas so we can continue to build the obstacle.”

Hamas initially said a typical smuggling tunnel was destroyed, but had no immediate response to the Israeli announcement. There were no casualties in the Israeli airstrike. The demolition of a tunnel belonging to the Islamic Jihad militant group in October killed a dozen militants.

Speaking from India, where he is on an official visit, Prime Minister Benjamin Netanyahu commented on the significance of the operation. “We are systematically destroying Hamas’ and Islamic Jihad’s tunnel infrastructure. Let them not mess with us,” he said.

Defense Minister Avigdor Lieberman said the tunnel’s construction was a clear violation of Israeli sovereignty and destroying it delivered a stinging blow to one of Hamas’ most significant assets. “The message to Gaza’s leadership and residents is clear – invest in the sanctity of life and not these burial tunnels,” he said.

Maj. Gen. Yoav Mordechai, who heads COGAT, the defense body responsible for Palestinian civilian matters, told the Arabic-language Alhurra TV station that Israel had information about other tunnels and that “soon, we will hear about the uncovering of the existing tunnels.”

Israel and Egypt have maintained a crippling blockade on Gaza since Hamas seized power in 2007.