Secret meetings between Palestinian intermediaries, Egyptian intelligence officials, the Turkish foreign minister, Palestinian President Mahmoud Abbas and Hamas leader Khaled Meshaal – the latter requiring a covert journey to Damascus with a detour round the rebellious city of Deraa – brought about the Palestinian unity which has so disturbed both Israelis and the American government.

Fatah and Hamas ended four years of conflict in May with an agreement that is crucial to the Paslestinian demand for a state.

A series of detailed letters, accepted by all sides, of which The Independent has copies, show just how complex the negotiations were; Hamas also sought – and received – the support of Syrian President Bachar al-Assad, the country’s vice president Farouk al-Sharaa and its foreign minister, Walid Moallem. Among the results was an agreement by Meshaal to end Hamas rocket attacks on Israel from Gaza – since resistance would be the right only of the state – and agreement that a future Palestinian state be based on Israel’s 1967 borders.

“Without the goodwill of all sides, the help of the Egyptians and the acceptance of the Syrians – and the desire of the Palestinians to unite after the start of the Arab Spring, we could not have done this,” one of the principal intermediaries, 75-year old Munib Masri, told me. It was Masri who helped to set up a ‘Palestinian Forum’ of independents after the Fatah-dominated Palestinian Authority and Hamas originally split after Hamas won an extraordinary election victory in 2006. “I thought the divisions that had opened up could be a catastrophe and we went for four years back and forth between the various parties,” Masri said. “Abu Mazen (Mahmoud Abbas) asked me several times to mediate. We opened meetings in the West Bank. We had people from Gaza. Everyone participated. We had a lot of capability.”

In three years, members of the Palestinian Forum made more than 12 trips to Damascus, Cairo, Gaza and Europe and a lot of initiatives were rejected. Masri and his colleagues dealt directly with Hamas’ Prime Minister Hanniyeh in Gaza. They took up the so-called ‘prisoner swap initiative’ of Marwan Barghouti, a senior Fatah leader in an Israeli jail; then in the winds of the revolutions in Tunisia and Egypt, the youth of Palestine on 15 March demanded unity and an end to the rivalry of Fatah and Hamas. Israeli prime minister Benjamin Netanyahu had always refused to talk to Abbas on the grounds that the Palestinians were not united. On the 16th, he made a speech saying that he was “thinking of going to Gaza”. Masri, who was present, stood on a chair and clapped.

“I thought Hamas would answer in a positive way,” he recalls. “But in the first two or three days after Abbas’ speech, it gave a rather negative response. He had wanted an immediate election and no dialogue. Hamas did not appreciate this.” Abbas went off to Paris and Moscow – to sulk, in the eyes of some of his associates. But the Forum did not give up.

“We wrote a document – we said we would go to see the Egyptians, to congratulate them upon their revolution. So we had two meetings with the Egyptian head of intelligence, Khaled Orabi – Orabi’s father was an army general at the time of King Farouk – and we met Mohamed Ibrahim, an officer in the intelligence department.” Ibrahim’s father had won renown in the 1973 war when he captured the highest ranking Israeli officer in Sinai. The delegation also met Ibrahim’s deputies, Nadr Aser and Yassir Azawi.

Seven people from each part of Palestine were to represent the team in Cairo. These are the names which will be in future Palestinian history books. From the West Bank, came Dr Hanna Nasser (head of Bir Zeit University and of the Palestinian central election committee); Dr Mamdouh Aker (the head of the human rights society); Mahdi Abdul-Hadi (chairman of a political society in Jerusalem); Hanni Masri (a political analyst); Iyad Masrouji (businessman in pharmacuticals); Hazem Quasmeh (runs an NGO) and Munib Masri himself.

The Gaza ‘side’ were represented by Eyad Sarraj (who in the event could not go to Cairo because he was ill); Maamoun Abu Shahla (member of the board of Palestine Bank); Faysal Shawa (businessman and landowner); Mohsen Abu Ramadan (writer); Rajah Sourani (head of Arab human rights, who did not go to Cairo); ‘Abu Hassan’ (Islamic Jihad member who was sent by Sarraj); and Sharhabil Al-Zaim (a Gaza lawyer).

“These men spent time with the top brass of the Egyptian ‘mukhabarat’ intelligence service,” Masri recalls. “We met them on 10 April but we sent a document before we arrived in Cairo. This is what made it important. In Gaza, there were two different ‘sides’. So we talked about the micro-situation, about Gazans in the ‘jail’ of Gaza, we talked about human rights, the Egyptian blockade, about dignity. Shawa was saying ‘we feel we do not have dignity – and we feel it’s your fault.’ Nadr Asr of the intelligence department said: ‘We’re going to change all that.’

“At 7.0 pm, we came back and saw Khaled Orabi again. I told him: ‘Look, I need these things from you. Do you like the new initiative, a package that’s a win-win situation for everyone? Is the Palestinian file still ‘warm’ in Cairo? He said ‘It’s a bit long – but we like it. Can you pressure both Fatah and Hamas, to bring them in? But we will work with you. Go and see Fatah and Hamas – and treat this as confidential.’ We agreed, and went to see Amr Moussa (now a post-revolution Egyptian presidential candidate) at the Arab League. He was at first very cautious – but the next day, Amr Moussa’s team was very positive. We said: ‘Give it a chance – we said that the Arab League was created for Palestine, that the Arab League has a big role in Jerusalem’.”

The delegation went to see Nabil al-Arabi at the Egyptian foreign ministry. “Al-Arabi said: ‘Can I bring in the foreign minister of Turkey, who happens to be in Egypt?’ So we all talkled about the initiative together. We noticed the close relationship between the foreign ministry and the intelligence ministry. That’s how I found out that ‘new’ Egypt had a lot of confidence – they were talking in front of Turkey; they wanted (italics: wanted) to talk in front of Turkey. So we agreed we would all talk together and then I returned with the others to Amman at 9.0 pm.”

The team went to the West Bank to report – “we were happy, we never had this feeling before” – and tell Azzam Ahmed (Fatah’s head of reconciliation) that they intended to support Mahmoud Abbas’s initiative over Gaza. “We had seven big meetings in Palestine to put all the groups there and the independents in the picture. Abbas had already given us a presidential decree. I spoke to Khaled Meshaal (head of Hamas, living in Damascus) by phone. He said: ‘Does Abu Mazzen (Abbas) agree to this?’ I said that wasn’t the point. I went to Damascus next day with Hanna Nasser, Mahdi Abdul Hadi and Hanni Masri. Because of all the trouble in Syria, we had to make a detour around Deraa. I had a good rapport with Meshaal. He said he had read our document – and that it was worth looking at.”

It was a sign of the mutual distrust between Hamas and Abbas that they both seemed intent on knowing the other’s reaction to the initiative before making up their own minds. “Meshaal said to me: ‘What did Abu Mazzen (Abbas) say?’ I laughed and replied: ‘You always ask me this – but what do you (italics: you) want? We met with Meshaal’s colleagues, Abu Marzouk, Izzat Rishiq and Abu Abdu Rahman. We reviewed the document for six and a half hours. The only thing we didn’t get from Meshaal was that the government has to be by agreement. We told him the government has to be of natiuonal unity -- on the agreement that we would be able to carry out elections and lift the embargo on Gaza and reconstruct Gaza, that we have to abide by international law, by the UN Charter and UN resolutions. He asked for three or four days. He agreed that resistance must only be ‘in the national interest of the country’ – it would have to be ‘aqlaqi’ – ethical. There would be no more rocket attacks on civilians. In other words, no more rocket attacks from Gaza.”

Meshaal told Masri and his friends that he had seen President Bashar Assad of Syria, his vice president Sharaa and Syrian foreign minister Moallem. “He said he wanted their support – but in the end it was the word of the Palestinian people. We were very happy – we said ‘there is a small breakthrough’. Meshaal said: ‘We won’t let you down.’ We said we would communicate all this to Fatah and the independents on the West Bank and to the Egyptians. In the West Bank, Fatah called it the ‘Hamas initiative’ -- but we said no, it is from everybody. After two days, Meshaal said he had spoken to Egyptian intelligence and they like what we have offered.”

The talks had been successful. Meshaal was persuaded to send two of his top men to Cairo. Masri’s team hoped that Abbas would do the same. Four men – two from each side – travelled to Egypt on 22 April. A year earlier, when there was a familiar impasse between the two sides in Egypt, the Moubarak regime tried to place further obstacles between them. Meshaal had fruitlessly met with Omar Sulieman – Mubarak’s intelligence factotum and Israel’s best friend in the Arab world – in Mecca. Sulieman effectively worked for the Israelis. Now all had changed utterly.

On the day Abbas and Meshaal went to Cairo, everyone went except the two rival prime ministers, Fayad and Hanniyeh. Hamas agreed that over the past four years, the Israelis had seized more of Jerusalem and built many more settlements in the occupied West Bank. Meshaal was angry when he thought he would not be allowed to speak from the podium with the others – in the event, he was – and Hamas agreed on the 1967 border, effectively acknowledging Israel’s existence, and to the reference to the ‘resistance’; and to give Abbas more time for negotiation.

If Hamas was in the government, it would have to recognise the State of Israel. But if they were not, they would not recognise anything. “It’s not fair to say ‘Hamas must do the following’, Masri says. “The resistance must also be reciprocal. But as long as they are not in the Palestinian government, Hamas are just a political party and can say anything they want. So America should be prepared to see Hamas ageeeing on the formation of the government. That government will abide by UN resolutions – and international law. It’s got to be mutual. Both sides realised they might miss the boat of the Arab spring. It wasn’t me who did this – it was a compilation of many efforts. If it was not for Egypt and the willingness of the two Palestinian groups, this would not have happened.” In the aftermath of the agreement, Hamas and Abbas’ loyalists agreed to stop arresting members of each side.

The secret story of Palestinian unity is now revealed. Israeli prime minister Netanyahu’s reaction to the news – having originally refused to negotiate with Palestinians because they were divided – was to say that he would not talk to Abbas if Hamas came into the Palestinian government. President Obama virtually dismissed the Palestinian unity initiative. But 1967 borders means that Hamas is accepting Israel and the ‘resistance’ initiative means an end to Gaza rockets on Israel. International law and UN resolutions mean peace can be completed and a Palestinian state brought into being. That, at least, is the opinion of both Palestinian sides. The world will wait to see if Israel will reject it all again.

Profile: Munib Masri

* The Masri family have been in the Palestinian resistance all their lives. As a small boy Munib Rashid Masri, from a respected family of Palestinian merchants, was demonstrating against British rule in Palestine and plans for the creation of Israel.

* Three of his children fought with Arafat's PLO in southern Lebanon during the 1982 Israeli invasion. "All our family believe it is our job to bring Palestine back," he says. "I gave all my life to Palestine."

* He was introduced to Yasser Arafat in 1963 by the PLO leader's deputy, Abu Jihad – Khalil al-Wazzir, later murdered by the Israelis in Tunis – and helped to smuggle money and passports to the guerrillas, but got on well with King Hussain of Jordan.

* With Arafat's permission, he briefly became Jordan's unpaid Minister of Public Works after the collapse of Palestinian forces in Black September in 1970; he rebuilt one of the largest Palestinian refugee camps in Jordan when the fighting ended. Much later, he would three times refuse to be Arafat's prime minister.

* After the Oslo accords were signed in 1993, Masri encouraged 15 Palestinian business people – he was one of them – to set up a $200m company called Padico.

* The investment company is now valued at $1.5bn, running telecoms, tourism and a stock market, responsible for the wellbeing of 27 per cent of the Palestinian economy – and 450,000 Palestinians.

Q & A: The events that led to the historic handshake

Q: How did the split come about? The rift between Fatah and Hamas, known among Palestinians as "Wakseh", meaning ruin or humiliation, emerged when Hamas won a sweeping majority in the 2006 elections. Hamas ran on a change-and- reform ticket and had garnered broad support through its social programmes. Anger with corruption within Fatah, and frustration with President Mahmoud Abbas's lack of progress on the peace process helped propel them to victory. The election result stunned US and Israeli officials, who had repeatedly said they would not work with a Palestinian Authority which included Hamas, and led to sanctions and a Western-led boycott. Security forces, still under Fatah's control, refused to take orders from the government and the US continued to fund Fatah. In 2007, the two sides briefly formed a unity government but it collapsed as masked gunmen took to the streets of Gaza. A state of emergency was announced and President Abbas dismissed Hamas's Ismail Hanniyeh as Prime Minister, swearing in a new emergency cabinet in the West Bank. Hamas seized control of Gaza, while Fatah held on to the West Bank, leaving a de facto split as both sides traded accusations about the legality of each other's rule.

Q: What was the impact of the rift on the peace process? The split between Hamas and Fatah effectively stalled the peace process, with Israel refusing to negotiate with a divided Palestinian leadership, which was forced to focus on putting its own house in order. However, with both sides reunited the prospect for peace is not necessarily more positive. The "Palestinian Papers", diplomatic cables leaked to Al Jazeera in January, showed Mr Abbas had offered far-reaching concessions during talks with Ehud Olmert's government, but to no avail. It is unlikely concessions so favourable to Israel will make it to the negotiating room again if Hamas has a seat at the table. Israeli Prime Minister Benjamin Netanyahu, who had used the rift as a reason not to negotiate, now says he will not speak to Mr Abbas if Hamas is included in the Palestinian government.

Q: What were the details of the agreement? In Gaza, dozens took to the streets to celebrate the Egyptian-brokered pact, signed on 4 May, which brought an end to four years of bitter rivalry. Hamas leader Khaled Meshaal said he was ready to "pay any price" to reconcile the factions. The deal envisaged a caretaker government with the task of preparing for parliamentary and presidential elections. Egypt has set up a committee to oversee the deal, but the unity government has a rocky road ahead, with potential pitfalls over how to integrate Hamas's military wing into the security services. For years, Egypt sponsored reconciliatory talks in Cairo – but to no avail. It was the renewed vigour of the Arab Spring that finally led to the historic handshake.

Belfast Telegraph