President Trump and President Xi Jinping of China will probably soon reach a trade agreement, but that won’t solve the biggest problems.

The Chinese regime is interning people based on religion in a more systematic way than any other regime since perhaps the Nazis. Its tolerance of fentanyl trafficking leads to some 20,000 drug overdose deaths in the United States each year. It steals intellectual property and ratchets up persecution at home.

I lived in China, speak Chinese and deeply admire the country. Yet I am increasingly repulsed by Xi’s China, for he is dragging the country in the wrong direction by imprisoning lawyers, journalists and people of faith; tightening controls over the internet; creating international security risks in the South China Sea; and fostering a personality cult around himself.

In fairness, it’s also true that the Chinese government has helped lift more people out of poverty than any other government in human history. Just since 1990, the mortality rate for children under 5 has fallen in China by 83 percent — suggesting, by my calculations, that an additional 676,000 Chinese children survive each year who previously would have died.

Those of us who condemn China for human rights violations must also acknowledge this uncomfortable truth: A child born in Beijing today has a substantially longer life expectancy (82 years) than a child born in Washington, D.C. (77 years).

In short, the Xi regime is complicated. It cheats, oppresses and brutalizes, but it also educates, enriches and saves lives.

I’ve seen the worst of China: I was on Tiananmen Square in 1989 when troops opened fire on the crowd I was in. I’ve also seen the best: impoverished families in western China moving out of caves into modern homes and sending their children to universities. I used to believe that China was best approached with ambivalence, but in the last few years the ambivalence has faded into wariness.

When a trade deal is reached, President Trump may hail it as a triumph, and it will probably result in announcements of Chinese purchases of American goods. A trade deal is a good thing, but I hope that the United States will work with allies and firmly stand up to China on three issues in particular.

First, to the extent possible, we should try to curb Chinese high-technology firms’ access to Western markets. These businesses are a security threat, and the Trump administration is right to be concerned. If a company like Huawei is asked to cooperate with Chinese State Security spies, its executives simply can’t say no.

This doesn’t mean that China is evil. American companies sold telecommunications equipment to China beginning in the 1980s that let us intercept officials’ conversations there, and we have inserted cyber “back doors” into goods and software sold to China so that we can cause damage in the event of a conflict. China purchased a Boeing 767 in 2000 to be its presidential jet and it arrived riddled with listening devices. China inevitably will try to do to us what we already did to it.

Second, we should continue to highlight human rights, especially China’s internment of perhaps one million Muslims in re-education camps. This is a staggering affront to religious liberty, with Chinese officials reportedly forcing Muslims to violate their faith by eating pork and drinking alcohol.

Bravo to Secretary of State Mike Pompeo for forthrightly denouncing China’s “awful abuses” in detaining “hundreds of thousands and possibly millions of Uighurs,” as well as its persecution of Christians. The Chinese authorities have even installed monitoring cameras inside Muslims’ homes, and they have sent many Muslim parents to re-education camps, leaving the children left behind to be brainwashed in boarding schools.

Third, we need continued pressure on China over its exports of fentanyl, the synthetic opioid that is killing Americans in huge numbers through overdoses. Two-thirds or more of the fentanyl in the U.S. originates in China, where the authorities have been promising since 2016 to crack down on it.

A few days ago, China announced that it would soon ban all variants of fentanyl, a welcome step that may make a difference. But China often promises cooperation that does not materialize, and everything will depend on enforcement over the country’s 160,000 chemical companies. Too many lives hang in the balance to take China at its word.

About 20,000 Americans appear to be dying each year from Chinese fentanyl (some of it entering via Mexico). That’s a toll of devastation far greater than that caused by terrorists in the U.S. over multiple decades, and it should arouse far more outrage than Chinese companies pirating videos.

So, sure, a good trade deal with China is welcome. But when so many Americans are dying from Chinese fentanyl, when one million Muslims are interned, when Emperor Xi is dragging China in the wrong direction, let’s not celebrate but, instead, keep up the international pressure.