The factions have been divided since Hamas militants drove Fatah fighters out of Gaza in June 2007 and seized control of the territory .