HONG KONG — Since he took power seven years ago, President Xi Jinping has faced a growing din of foreign condemnation over his government’s human rights record, a trade war that has sapped China’s strength and now, for a second time, mass protests in the streets of Hong Kong.

Yet again and again, instead of moving toward compromise or change, Mr. Xi and his subordinates have made hard-line decisions that have compounded and complicated pressures on the ruling Communist Party. They have stood by those decisions even after they have blown up into unexpected crises, like this week’s tumultuous demonstrations in Hong Kong against a plan to allow extraditions to mainland China.

“Xi Jinping has been a very good student of Machiavelli — it’s better to be feared than to be loved,” said Jean-Pierre Cabestan, a professor at Hong Kong Baptist University and the author of “China Tomorrow: Democracy or Dictatorship?”

Carrie Lam, Hong Kong’s chief executive, has said she decided to pursue the extradition law herself, without any prodding from Mr. Xi or other Chinese leaders. But several senior Communist Party officials have endorsed the proposal, and it is clear that Mrs. Lam’s move would please Mr. Xi’s government, which wants greater influence over the city.