The declaration was made at a ceremony at the Egyptian intelligence headquarters in Cairo.

Western-backed Palestinian President Mahmoud Abbas said the accord ended "four black years" that hurt national Palestinian interests. He also said he would "soon" visit Hamas-held Gaza Strip.

The pact provides for the creation of a joint caretaker Palestinian government ahead of national elections next year, but leaves key issues unresolved and makes no mention of peace talks with Israel.

Israel has denounced the pact in advance of the Cairo ceremony, because of the militant Hamas' long history of deadly attacks against Israeli targets. It has equated the deal with a renunciation of peacemaking.

Like the U.S. and the European Union, Israel considers Hamas a terrorist organization and says it will not negotiate with a future Palestinian government that includes the Iranian- and Syrian-backed group.

Abbas rejected Israel's opposition to the pact, saying the reconciliation with the militant Islamic group was an internal Palestinian affair.

"They are our brothers and family. We may differ, and we often do, but we still arrive at a minimum level of understanding," Abbas said of Hamas.

And in a message to Israel, Abbas added: "We reject blackmail and it is no longer possible for us to accept the occupation of Palestinian land."

Hamas leader Kahled Mashaal also addressed the ceremony, saying his group was prepared to do anything to "translate the text of the pact to facts on the ground. Our battle is with the Israeli enemy and not with Palestinian factions."

It's not clear whether Western powers would deal with the new government that is to emerge from the unity deal. So far, they've said they are waiting to see its composition.

The Quartet of Mideast mediators -- the U.S., the EU, the United Nations and Russia -- has long demanded that Hamas renounce violence and recognize the principle of Israel's right to exist.

But Abbas aide Nabil Shaath told Israel Radio ahead of Wednesday's signing that these demands "are unfair, unworkable and do not make sense."

The only thing the Quartet needs to know, he said, is that Hamas "would refrain from any violence ... and be interested in the peace process."

Hamas and other Palestinian militant factions in Gaza have agreed to abide by an unofficial truce with Israel, largely in place since Israel's January 2009 war in the territory. But it is unclear how long that truce will last, and Hamas has consistently rejected negotiations with Israel.

The reconciliation deal is designed to unify the dueling Palestinian governments that emerged after Hamas violently wrested control of Gaza from security forces loyal to Abbas in June 2007 and left his Fatah controlling only the West Bank.

In a symbolic step, Hamas allowed Fatah-controlled Palestine TV to broadcast from Gaza for the first time since the 2007 takeover. The station's Gaza correspondent, Adel Zaanoun, discussed the excitement that Gazans felt about unity and invited Ismail Radwan, a Hamas leader, onto the program.

"Today we end a dark chapter in our recent history," Radwan said. "It's time now to work together ... With the support of our people and the Arab brothers, we will make this agreement work."

Also for the first time, Hamas permitted residents to wave yellow Fatah banners along with the green Hamas flags. Fatah displays had been banned by Hamas police in the past.

Some Gaza residents greeted the impending deal with a mixture of hope and caution, the last failed attempt at unity fresh in their minds. Their concerns were underscored by reports Wednesday's signing ceremony was slightly being delayed by last-minute arguments.

"Hope is all we have. We have suffered a lot from the political split," said Yousef Ali, a 22-year-old law student in Gaza. "But fear is there. Failure is possible and this is something we need to keep in mind ... I think the people will not show mercy this time for anyone who will try to sabotage this unity."

Ibrahim Qassem, a 45-year-old driver, said he did not trust the Palestinian leaders. "I saw the same atmosphere in 2007. What's the difference now?"

The deal doesn't resolve many key issues, such as control of security forces, and many expect it to quickly crumble.