The head of the prison said four inmates linked to the al-Qaida terrorist network , one Iraqi and three Pakistanis , overpowered and killed a prison guard and seized his weapon .