BEIJING — When President Xi Jinping of China meets foreign leaders, he tends to recite talking points in a dutiful monotone, diplomats say. But when challenges to China’s sovereignty come up — like protests in Hong Kong — he roars to life.

“He read flatly from the script,” one Western official said of such a meeting. “But when it got to China’s core interests, these disputes, he put down his notes and spoke passionately.”

For anyone puzzling over why China reacted so swiftly and severely to block two pro-independence politicians from taking their seats in Hong Kong’s legislature, Mr. Xi’s expansive idea of sovereignty is a good place to start.

“He lets you know that this is what really matters,” said the Western official, who spoke on the condition of anonymity to describe a closed-door meeting with Mr. Xi.