One detainee was fatally shot and two others were injured when a gunman opened fire on the agency's field office.