Fatah and Hamas said on Thursday they have reached a 'comprehensive agreement' that will allow the Palestinian Authority government to operate in Gaza.