"Gaza has a different day and a different night," Abu Ali Saleh, 50, told Reuters. "Gaza has not been this happy in years."
Thousands poured into the streets and gunmen fired in the air to welcome an agreement between the groups that Palestinians hope will persuade the West to lift crippling sanctions and bring an end to weeks of factional violence.
Drivers in Gaza City honked horns, sounded sirens and waved either green Hamas or yellow Fatah flags out of car windows after hearing news of the deal signed following talks between
Abbas and Hamas political leader Khaled Meshaal in the holy city of Makkah.
Many Palestinians had fled Gaza City following the violence which has killed more than 90 Palestinians since December. Tensions between the rival groups had escalated after Hamas beat Fatah in a parliamentary election last year.
Abbas angered Hamas by threatening in December to call an election after failed negotiations to form a unity coalition.
Officials says the two sides agreed Thursday on a distribution of cabinet posts with a Fatah deputy next to Haniyeh and key posts of finance, foreign affairs and interior going to independents.
Officials named former culture minister Ziad Abu Amr as foreign minister and Salam Fayyad as finance minister, a post he has held before. Hamas officials have tipped Hamouda Jerwan as interior minister, though Jerwan said he had not been informed.
Abbas had also been seeking a clear statement that the new government would be "committed" to past accords, as a formula offering implicit recognition of Israel from Hamas.
Palestinians hope a unity government can persuade the West to renew aid to the Palestinian Authority, which it had halted after Hamas won the election.
The government has not been able to pay about 165,000 employees as a result of the sanctions.
"At last they agreed," said Hassan Ali, a 37-year-old government employee from Gaza.
"I hope it would be a lasting agreement to end the fighting and I hope that at last we will start getting paid."
Palestinians in the West Bank also celebrated the unity deal.
"We are happy today watching our leaders shaking hands instead of killing each other," said Nasri Abu Rajab, 26, a resident of the city of Al-Khalil (Hebron.)
"I hope this agreement will be a serious and official one and not like the previous agreements," added 38-year-old Hussein Haniyeh.
A Hamas official appeared to suggest the movement was betting on a US rejection but European and Arab support.
"I believe this agreement could be accepted by the European Union. We have had talks with European parties who say such an agreement could be accepted," Nasser Shaer, deputy prime minister in the outgoing government, said in Ramallah.
Asked if the deal met U.S. and Israeli demands, Shaer said: "With Israel? No. America has its own scenario ... we are betting on assistance from Arab countries. Saudi Arabia as well as other Arab states could help sell this agreement."
In the first international reaction, British Foreign Secretary Margaret Beckett called the agreement "interesting".
"We will need to study these proposals carefully and discuss them with our European and other partners," she said in a statement.
Israeli Prime Minister Ehud Olmert is scheduled to meet US Secretary of State Condoleezza Rice and Abbas on February 19 in what has been billed as a bid to restart long-stalled peace talks.
But the meeting could be in doubt if Israel and the United States say the wording of the unity deal does not go far enough.Güncelleme Tarihi: 20 Eylül 2018, 18:16