GAZA CITY, Palestinian Territories — Hamas and Islamic Jihad, the main Palestinian Islamist movements, are holding talks about merging their two factions, sources on both sides said on Tuesday.

During a meeting with top officials from Islamic Jihad, Gaza’s Hamas prime minister Ismail Haniya called for “opening a serious dialogue to achieve the merger of the two movements,” his office said in a statement.

Islamic Jihad confirmed that talks to merge the two factions were already under way.

“An in-depth dialogue has actually begun, both internally and externally, with the aim of uniting,” spokesman Daud Shihab told AFP, referring to the group’s leadership which, like Hamas, is based in both Gaza and Damascus.

All previous attempts to merge the two Islamist movements had ended in failure, Shihab said.

He indicated that the current talks were taking place “at the highest level” among the leaders of both factions in Gaza and Damascus as well as among Islamist prisoners being held in Israeli jails.

Uniting the two movements would be “in the interests of both the Palestinian cause and the future of the Palestinian liberation movement, particularly in light of the Arab Spring,” he said.

It was the first time Hamas and Jihad have spoken publicly about merging.

The two factions have long held opposing views on government, with Jihad boycotting the last Palestinian elections in 2006 that were won by Hamas.

The initiative to explore a merger comes as Hamas and its Fatah rival which dominates the West Bank-based Palestinian Authority struggle to implement a reconciliation deal signed in April 2011 that has made little progress on the ground.

There are also moves to reform the Palestine Liberation Organisation (PLO), which is internationally recognised as the sole legitimate representative of the Palestinian people, to allow Hamas and Islamic Jihad to join it.

It also comes in the wake of a series of electoral successes for Islamist parties in Egypt and Tunisia following the political upheavals brought on by the Arab Spring.