British officials have raised the national terrorism threat to its second-highest level.