Threat of imminent terrorist attack almost over — government