Several hours later 17 Fatah men were reported to have been seen walking out of prison.
“With the release of the 17 political prisoners, we declare an end to political detention in Gaza,” Taher al-Nono, a spokesman for the Hamas government in the territory, said.
Fatah has said that Hamas has captured dozens of its members since it seized control of the Gaza Strip from Fatah in June 2007.
According to Hamas, Fatah are holding about 400 of its supporters in the West Bank.
“We urge Fatah to reciprocate and free Hamas members jailed there,” Nono said.
Reconciliation talks are expected for November 9 in Cairo. Egypt has asked 13 Palestinian factions, including Hamas and Fatah, to the dialogue.
Haniya said that he was “cautiously optimistic” about a positive outcome from the talks.
He said: “I must say that the Palestinian dialogue is at crossroads and the success of the dialogue depends on Egypt taking all the remarks and amendments introduced by the balanced Palestinian factions into due consideration, simply we do not want to repeat our past failures.”
Fahmi al-Zarir, a Fatah spokesman, said Haniya had finally recognised that Hamas “has been abducting Fatah men in Gaza because of their political opinions and nothing else”.
Hamas had said that those Fatah members held had committed criminal acts, rather then arrests being politically motivated.