WASHINGTON — President Trump has enacted a law that requires the State Department to punish Chinese officials who bar American officials, journalists and other citizens from going freely to Tibetan areas in China’s far west.

By some measures, those areas, though sparsely populated, make up one-quarter of China’s territory, and they have been the site of protests and riots against Chinese rule for decades. Because of the delicate political situation, the Tibetan plateau has long been under careful watch by central and local security officials.

Chinese security agencies often make it difficult for foreigners to travel in most of the areas, and those restrictions have gotten tougher since widespread protests took place in 2012.

The government and the ruling Communist Party ban foreign diplomats and journalists from going to central Tibet, called the Tibet Autonomous Region, without getting official permission and going on carefully organized propaganda tours. It has been eight years since The New York Times was allowed to go on one of those trips, which are run by the Foreign Ministry.