After three weeks of fighting in Gaza, the Israeli military has attained the goals set out for it, and the country’s political leadership needs to give it a new mission or pull troops out, a senior military official said Tuesday.

The unnamed officer, quoted in Israeli media reports, said it was unlikely Israel had found or would find every tunnel in use by Hamas to infiltrate into Israel — the stated goal of the ground operation — but the army had destroyed “the ability to use the tunnels.”

“We have reached the goals that were defined for us,” the officer said in media reports. “The political leadership needs to make a decision if we are going in further or pulling out of the Gaza Strip.”

The statement came a day after ceasefire efforts seemed to be pushed back as a several-day easing of hostilities gave way to heavy fighting, with multiple casualties on both sides. On Monday night, Prime Minister Benjamin Netanyahu said the country should be prepared for a prolonged conflict.

At the start of the ground operation two weeks ago, Netanyahu declared the objective was to destroy the “terror tunnels” dug by Hamas under the Israel-Gaza border and to achieve an agreed upon prolonged period of quiet.

On Tuesday, five IDF soldiers were killed after being attacked by Hamas militants who had tunneled under the border and into Israel, the latest in a series of infiltration attempts via tunnels, some of which have caught the army by surprise.

“By the end of the campaign we won’t find every tunnel down to the last shaft, but we are destroying the ability to use the tunnels,” he explained. “At the end of the day, the mother from Netiv Ha’asara will return with her children to a safer life at home. We were surprised by the relationship between the tunneling and the top of the Hamas command chain.”

The officer also hinted that the IDF was tasked with doing more than dealing with the tunnel infrastructure.

The officer told Walla News that 50 percent of Hamas’s ability to fire medium- and long-range rockets has been damaged. He noted that the IDF was given to understand that it should also use the operation to “create a new situation.”

“First to hit Hamas hard and to deny its future ability,” he said, and added that the terror organization is suffering due to the wilting of Egyptian support. “Its ability to rehabilitate is harder because of the situation in Egypt.”

He warned, however, that occupying Gaza by force would “take months and years, with the price that would entail.”