Israeli officials say the measure is necessary to prevent Hamas militants and supporters from smuggling weapons into Gaza .