Iran has sent tens of millions of dollars to the Hamas military wing to help reconstruct tunnels used by the terror group in its operations against Israel, and to replenish its rocket arsenal, the Sunday Telegraph reported, citing intelligence sources.

The funding is to refurbish underground infrastructure in the Gaza Strip that was destroyed during the 2014 summer conflict with the IDF. During the conflict, the army demolished over 30 tunnels in the coastal enclave. Hamas used the tunnels, many of which extended into Israeli territory, to launch deadly terror attacks against Israeli forces and civilian communities.

In addition to the tunneling operations, the Iranian aid is also being directed toward a new stockpile of missiles for Hamas after its arsenal was depleted during the 50-day conflict, the Telegraph said.

The report did not indicate when the funds were transferred to the Gaza terror group.

The funds are seen as marking a warming of relations between Shiite Iran and Hamas, which is aligned with Sunni Islam. Although in the past Iran had backed Hamas, the two had a falling out over the civil war in Syria, after Hamas supported Sunni rebels trying to oust President Bashar Assad’s regime. Iran has acted to bolster Assad, directly and through its proxy, the Shiite-aligned Lebanon-based Hezbollah.

“Iran’s Shia leaders are trying very hard to increase their influence throughout the region at the expense of the Sunni regimes,” a senior Western security official told The Telegraph. “But there is a growing sense throughout the region that Tehran has overplayed its hand, and Iran now finds itself facing a backlash.”

Israeli security sources in March said that Hamas has invested considerable effort in digging a new tunnel network within the coastal enclave, as well as several tunnels meant for eventual cross-border attacks.

But according to those sources, the terror organization was being careful to avoid crossing into Israeli soil, in order to avoid an eruption of hostilities.

Local residents said evidence of digging can be seen from the Israeli side of the border and those in the Gaza periphery have documented the construction some several hundred meters from the border.

The security sources maintained that only a few attack tunnels are being dug, rather than the dozens that were operational immediately before the summer conflict and during it.

More than 2,000 Palestinians were killed in Gaza during the IDF’s Operation Protective Edge in 2014, according to UN figures, which said most of them were civilians. Israel said some 1,000 of the fatalities were Hamas operatives and other gunmen, and blamed Hamas for all civilian casualties, arguing that the group attacked Israel from within residential areas.

Hamas and other terror groups fired over 4,500 rockets and projectiles at Israel, and staged several deadly attacks against IDF soldiers through cross-border tunnels. Seventy-three people on the Israeli side, most of them soldiers, were killed during the operation.

Avi Issacharoff contributed to this report.