The Gazainfo-icon head of the Palestinian Islamist movement Hamas said on Monday it had increased its military capabilities thanks to newly improved relations with Iraninfo-icon.

In a rare meeting with a small number of journalists, Yahya al-Sinwar said Iran was "the biggest supporter" of Hamas's military wing, the Ezzedine al-Qassam Brigades.

Hamas was "developing our military strength in order to liberate Palestineinfo-icon," Sinwar said in response to an AFP question, but he also stressed that the movement did not seek warinfo-icon.

Hamas has run Gaza since 2007 and received Iranian financial and military support for years before it was reduced following a falling out over the Syrian civil war.

It was the first time Sinwar had spoken on record with international journalists since he became the organisation's Gaza chief in February.

Sinwar said relations with Tehraninfo-icon had improved in recent months, with a delegation visiting Tehran.

"The Iranian military support to Hamas and al-Qassam is strategic," he added, saying the relationship had "become fantastic and returned to its former era".

"Every day we build missiles and continue military training," he added, saying that thousands of people are working "day and night" to prepare for the next conflictinfo-icon.

According to the report, Iran was keen to restore ties with Hamas after Ismail Haniyeh was elected as head of Hamas's political bureau and Sinwar as the group's Gaza chief. Both are considered to be more open to reconciliation with Iran than was Khaled Mashaal, the former political leader of Hamas.

During the Hamas delegation's visit in Tehran earlier this month, Iranian Foreign Minister Mohammad Javad Zarif said the Palestinian issue remained a top foreign policyinfo-icon priority for his government, which was "ready to put aside all disagreements [with Hamas] for the sake of supporting Palestine and the Palestinian people as well as the unity of the Musliminfo-icon worldinfo-icon."

However, he stressed that the movement "doesn't want a war and takes every effort to avoid a war".

"At the same time we are not afraid of a war and are ready for it."

The Islamist movement, which is considered a terrorist organisation by the United Statesinfo-icon and the European Unioninfo-icon, has fought three wars with Israelinfo-icon since 2008, most recently in 2014.

- Former top commander -

The election of the 56-year-old in February was seen by analysts as Hamas's military wing asserting power over the political one.

Prior to taking the job, he was a top commander in Qassam with decades of intelligence experience and a reputation as a fierce advocate of military struggle against Israel.

He also speaks Hebrew well, having spent 23 years in Israeli jails with four life sentences for "terrorist activities". He was released in a prisoner swap in 2011.

Sinwar has reached out both to old allies and to enemies as Hamas seeks to avoid regional isolation.

Relations with Iran had faltered over Syriainfo-icon, where Tehran backed President Bashar al-Assad while Hamas distanced themselves from his regime as he violently crushed an uprising.

However, Sinwar has sought to push previous tensions under the carpet and rebuild relations -- sending a high-level delegation to meet Iranian politicians.

At the same time he has made overtures to Mohammed Dahlan, a former ally of Palestinian president Mahmud Abbas turned rival who is seen as close to the Egyptian government.

Palestinian Authority leader Abbas has in turn sought to squeeze Hamas by reducing the amount of electricity the PA paid for in Gaza, further worsening a power crisis there. Residents now receive only a few hours of mains electricity a day.

Sinwar called on Abbas to form a government of national unity with Hamas "for a year or two in preparation for holding presidential and legislative electionsinfo-icon".

Multiple attempts at reconciliation between Abbas's Fatah movement and Hamas have failed.