The preliminary deal was reached between Palestinian President Mahmoud Abbas, who leads the Fatah party, and Khaled Mashaal, leader of the militant Hamas group, which has held a parliamentary majority for the past year.
According to Arab media reports, the agreement relates to the distribution of ministerial posts in a future national unity government, and aims to end fighting between the rival groups and restart constructive dialog.
Until now the escalating struggle for political influence between Hamas and Fatah had scuppered talks on forming a unity government. During the latest wave of violence between gunmen from the two factions in Gaza, at least 30 people lost their lives last week, and hundreds were injured. The conflict had escalated after an explosion in Jabalya last December that left two members of the Islamic group dead.
Hamas, still considered a terrorist organization by Israel, the U.S. and the EU, gained a majority in the Palestinian National Authority (PNA) after defeating Fatah in January 2006 polls.
Since Hamas came into power, Western nations have blocked aid to the Palestinian government, over the Islamist group's refusal to recognize Israel's right to exist, give up violence and comply with previous Palestinian-Israeli agreements seeking a solution to the long-protracted Middle East crisis.
Since then, all talks between Hamas and Fatah on the formation of a power-sharing government had ended in deadlock.
The sides at the Mecca summit pledged on Wednesday not to end the talks until a mutually-acceptable agreement is reached.