Hamas and Fatah have agreed to form a unity government by January 2012, an official for the Gaza-ruling militant group said on Wednesday, following months of failed talks geared at achieving Palestinian reconciliation.

The rival Palestinian factions have been attempting to put into action a reconciliation agreement brokered by Egypt and signed earlier this year in Cairo.

Israel has rejected the agreement, refusing to negotiate with a government including Hamas, whose charter calls for the destruction of Israel.

On Wednesday, Hamas spokesman Fawzi Barhoum told the Palestinian news agency Ma'an that Fatah and Hamas leaders have stated that a joint cabinet will be sworn in by the end of January 2012.

The Ma'an report added that rival factions also stipulated that all political prisoners in the West Bank and Gaza Strip should be released before the end of January 2012.

In another decision, Fatah and Hamas said that the elections committee which will take charge of the upcoming Palestinian vote will be headed by chairman of the Palestinian Authority's Central Elections Commission Dr. Hanna Nasser, who is also the former president of Birzeit university near Ramallah.

Earlier this month, Haaretz reported that Hamas will only agree to hold presidential and parliamentary elections in their planned May date only if voting takes place in East Jerusalem and Hamas is allowed to participate, a condition to which Israel will almost certainly object.