KASHGAR, China — The five policemen in black uniforms surrounded the young man and his friend on the sidewalk.
The man, an ethnic Uighur, pulled out identification. The policemen had been unaware that he was one of their own — an officer, but in plainclothes.
The man, whose name my companions and I would later learn was Rexat Yusuf, had been following us since we left our hotel in Kashgar, a Silk Road oasis town in the deserts of far west China. From the start, we could tell he and his companion, who was of the dominant Han ethnicity, were policemen assigned to watch us.
On our stroll, we reached the rebuilt ramparts of the old city wall and climbed stairs to take photographs. The two men waited at the bottom, and that was when the police patrol confronted them.
When we walked down minutes later, the same patrol turned its attention to us. They asked for our identification. Because I was renewing my journalist visa, I did not have my passport on me — it was in the hands of the Beijing police unit overseeing visas. They had given me a temporary travel document that I had left in our hotel.
The police then ushered our group — Gilles Sabrié, a photographer; Vanessa Piao, a bureau researcher; and me — into a van and drove us to a station. We were under detention.
So went my final reporting trip as Beijing bureau chief for The New York Times. It was my fifth visit to Kashgar, on the rim of the Chinese empire. I found that officials had tightened security measures and limits on the religious practice of the Uighurs, who are mostly Sunni Muslim.
In the streets, I saw regular police patrols, mobile police stations resembling food trucks and officers asking Uighur men for identification. On my first trip, in 1999, I had seen many women wearing full face veils. Now that was absent. And only elderly men and Pakistani traders had long beards.
Officials said they were trying to prevent violent, anti-state episodes in Uighur areas, which they attributed to separatism, terrorism and religious extremism. The greatest outburst took place in 2009, when ethnic rioting in Urumqi, the capital of Xinjiang, the autonomous region where Kashgar is located, resulted in about 200 deaths. Uighur advocates say the harsh security measures fuel resentment.
I flew to Kashgar for a last look because it is a touchstone in my relationship with China. For me, as for travelers through the centuries, this town in the heart of Central Asia has been a crossroads and a gateway. It is a bridge between interior China and the Eurasian continent, with its Islamic lands. It even lay closer to my former bureau in Baghdad than to my current one in Beijing, 2,500 miles away.
My first encounter with Kashgar was in the summer of 1999, when, after graduate school, I backpacked overland from Hong Kong to New Delhi. Kashgar was my gateway out of China then — a final stop before taking the glacier-flanked Karakoram Highway through the Pamir Mountains into Pakistan. I boarded a bus with other travelers from the Chini Bagh Hotel, on the site of the former British Consulate.
I did not return to Kashgar until August 2008, months after arriving in China for The New York Times. I and other members of the Beijing press corps flew to Kashgar to report on a bizarre assault that had resulted in the deaths of at least 16 paramilitary officers.
I went back that autumn during a trip across southern Xinjiang to report on restrictions on Islam. My companion, Xiyun Yang, and I ended up in the apartment of a retired Uighur policeman and chatted with his son about Western television shows.
In 2010, Mr. Sabrié and I arrived in Kashgar after a long overland trip from the Wakhan Corridor of Afghanistan. Following days of driving through the mountains of Tajikistan and Kyrgyzstan, we experienced the same wonder that travelers must have felt centuries ago — at the bustling markets, the food stalls redolent with kebabs and cumin and the cool alleyways winding among mud-walled homes. The town was boisterous: Eid al-Fitr, the three-day feast celebrating the end of Ramadan, was starting.
That year, officials were razing most of the old town. Half-destroyed homes stood in dirt lots. When I arrived months ago on my final trip, those parts of the old town had been rebuilt. There were wide avenues and new concrete buildings. It was easier now for the police to monitor the streets and deploy large units.
The police surveillance made a greater impression on me than anything else. On earlier trips, I had not noticed being followed by the police, even after hotels had handed copies of our visas to the local police station. This time, I saw Mr. Yusuf and his companion tailing us as soon as we walked out of the Chini Bagh Hotel.
That was nothing compared with the police foot patrols, though. We ran into the first one in a market north of the Id Kah Mosque. A couple of ethnic Han officers stopped us to ask for documents. They zeroed in on Mr. Sabrié, the obvious foreigner in our group. He pulled out his French passport, and they let us go.
Within an hour, we were confronted at the city ramparts by another patrol. That was the one that had mistakenly hassled Mr. Yusuf. They put us into their van when I said I did not have my travel document. After a wait at the station, Mr. Yusuf showed up. “What are you doing in Kashgar?” he asked in fluent English. He looked at the photos on Mr. Sabrié’s camera and told him not to shoot anything related to the police or the military.
Then they drove us back to the hotel so I could show them my travel paper. We passed a grassy clearing by the ramparts. “I took wedding photos there,” Mr. Yusuf said.
After I got the document from my room, they said we were free to go. But Mr. Yusuf said he would keep an eye on us. “Kashgar can be dangerous for foreigners,” he said. “We want to make sure you are safe.”
Having covered the Iraq war for three and a half years, I had some awareness of risk, and I never got the sense of being in danger anywhere in Xinjiang.
We wandered more around the old city. A plainclothes police detail of five followed us. When we glanced back, they lowered their heads and pretended to check their phones.
The next day, a Uighur guide named Abdul Wahid took us around Kashgar. We went first to the outdoor animal market, outside town. When I first visited Kashgar, in 1999, the market had been in the city center. There, Uighur, Kazakh, Kyrgyz and Tajik herders haggled over horses, donkeys, sheep and camels. Our guide said the market had moved twice since.
Mr. Yusuf and other officers followed us around. We sat down to eat a bowl of noodles.
“Business is very good here, better than at the old place,” said Kerimaji, the noodle seller, who had been working in the market for 34 of his 62 years.
That afternoon, we walked inside the 15th-century Id Kah Mosque, where young men stabbed to death the imam in 2014. We passed through metal detectors. In the courtyard, I noticed surveillance cameras above paths. The same cameras were present throughout the old city.
In the plaza in front of the mosque, I saw a mobile police station and officers milling around. One officer walked up to Abdul Wahid and asked him for his papers. Abdul Wahid said he was taking us foreigners around. The policeman then turned and walked over to a long line of Uighur men whom he had rounded up. He led them away to register them.
What I saw was happening across Xinjiang. In late 2016, regional officials established thousands of mobile police stations and deployed tens of thousands of policemen to staff them, according to an article last December in Foreign Affairs by two scholars, James Leibold and Adrian Zenz. The Xinjiang party chief, Chen Quanguo, was putting in place the same grid policing system he had used in Tibet.
Back at the hotel, I said goodbye to our guide. An American diplomat I had met in Beijing was checking in.
In the evening, we took a final stroll. We stopped at a carpet shop owned by the father of Abdul Wahab, a young Uighur man who visited Beijing to sell carpets and whom I knew. He had just been in eastern China and was on his way back to Kashgar to get married, but his flight had been grounded in Urumqi because of fog. We would not see him on this trip.
As Abdul Wahab’s father, Ahmad, showed us carpets, Mr. Yusuf walked into the room. A couple of police tails lingered outside. Ahmad spread out a few carpets. Some had the classic pomegranate design native to Xinjiang. I began negotiating for one.
“I think that’s a good one,” Mr. Yusuf said, pointing to the piece that had caught my eye. But he shook his head at the price.
Mr. Yusuf and his colleagues trailed us when we left. We went into a restaurant to have a kebab dinner. They did not follow us inside, and we saw no sign of them for the rest of the night.