Beijing warned of 'terror threat'