Hamas on Wednesday said they had begun constructing a security buffer zone between the Gaza Strip and Egypt, as it attempts to improve ties with Cairo.

The new area will be a closed-off military zone, and will stretch 12 kilometers (7.5 miles) along the southern border of the coastal Strip with the Sinai Peninsula, and will reach 100 meters (330 feet) into Gaza, the Hamas-run interior ministry said. It will include observation towers, cameras and lighting.

Tawfiq Abu Naim, a security chief of the Gaza-based terror group, said the new security zone was being constructed as part of a recent agreement between Cairo and Hamas.

“These continuing measures are for the sake of achieving control of the southern border and to completely prevent infiltration and smuggling,” Abu Naim said in the statement.

He added that the construction of the buffer zone “is a reassuring message directed at the Egyptian side that the national security of Egypt is the national security of Gaza.”

“We can not allow any threat to the stable security situation on the southern border,” he said.

The ministry posted pictures of the construction on Twitter.

A high-level Hamas delegation spent nine days in Cairo earlier in June, as part of an effort by the terrorist group to improve relations with Egypt since the overthrow of Mohammed Morsi, Egypt’s Muslim Brotherhood president, in 2013. Hamas was affiliated with the Brotherhood.

The current Egyptian government led by former military leader Abdel-Fatah el-Sissi has closed hundreds of smuggling tunnels along the border and accused Hamas of supporting Islamist radicals inside Egypt, including near the border.

Cairo also all but closed off the border between Egypt and Gaza, adding to the isolation of Gaza.

After those meetings, Egypt reportedly offered Hamas more freedom at its border and much-needed electricity amid a severe power shortage, in exchange for Hamas agreeing to a list of security demands.

The list includes a demand that Hamas hand over 17 men wanted by Cairo on terrorism charges, more protection by Hamas at the border, the cessation of weapons smuggling into the Sinai, and information on the movement of militants into Gaza via underground tunnels, the London-based Arabic daily Asharq al-Awsat reported.

Egypt also accuses Hamas of aiding Islamic State fighters it is battling in its northern Sinai region.

Hamas also made a gesture toward Egypt last month with a new policy document that dropped its longtime association with the Muslim Brotherhood and identified itself as a Palestinian movement fighting only against Israel.

However, other factors appear to play a role, including Egyptian support for Mohammed Dahlan, an exiled Palestinian official with presidential ambitions. The former Gaza strongman had bitterly fought Hamas a decade ago, became Abbas’s top aide after losing that battle and then fell out with the Palestinian leader in 2010.

A picture taken on June 28, 2017 from the Gaza strip border-town of Rafah shows Egyptian border guards patrolling on the other side of the border while riding in an armored personnel carrier. (AFP PHOTO / SAID KHATIB)

A picture taken on June 28, 2017 from the Gaza strip border-town of Rafah shows Egyptian border guards patrolling on the other side of the border while riding in an armored personnel carrier. (AFP/Said Khatib)

Earlier this month, Gaza’s top Hamas leader, Yahya Sinwar, met at least once with Dahlan in Egypt, as part of a series of talks between Dahlan’s camp and a Hamas delegation.

Dahlan helped persuade Egypt to send badly needed fuel to Gaza in exchange for Hamas allowing him to broaden his political presence in Gaza, according to officials involved in the negotiations.

Since last week Egypt has sent a few millions liters of diesel fuel to Gaza so the Strip’s only power plant could begin operating again after months of being shut down. It is unclear how long Egypt will continue to send fuel to Gaza, which is seeing between 2-3 or 4-6 hours of power a day.

Agencies contributed to this report.