British police said a security incident outside parliament on Wednesday which saw a police officer stabbed and his assailant shot was being treated as "terrorist".