An Israeli army spokesman said Saturday the soldiers opened fire when three men appeared to be about to plant an explosive device on a fence , east of Gaza City .