On Donald Trump’s first foreign trip, he is visiting one of our putative allies in the Middle East: the Kingdom of Saudi Arabia. For the president, who has been called the great “disruptor” of American politics, the trip is an opening to begin undoing the deplorable U.S.-Saudi relationship.

For years, the U.S. has embraced Saudi Arabia as an ally and sold it billions of dollars’ worth of military weapons. But at the deepest level, Saudi Arabia is hostile to our ideal of individual rights. While the regime is seen as standing with us against Islamic State, or ISIS, Saudi Arabia embodies and exports its own brand of Islamic totalitarianism.

The Saudi regime stands out for its exacting imposition of Islamic law, or sharia. What you think, what you say, and what you do must reflect obedience to religious authority — not your own judgment. During the month of Ramadan, for example, when Muslims fast during daylight hours, it’s forbidden in Saudi Arabia to eat, drink or smoke in public; beware, for here, as in territory controlled by Islamic State, the (literal) “morality police” might catch you. Censorship is pervasive. There are thoughts and ideas and beliefs you are forbidden to hold, forbidden to live by.

Merely bringing up the idea of peeling Islam away from state power is incendiary. Ask Raif Badawi, a blogger and activist. “Secularism respects everyone and does not offend anyone,” he wrote, noting that it “is the practical solution to lift countries (including ours) out of the third world and into the first world.” Badawi hoped to spur discussion of secularism, gender equality, and what he called liberalism in society (“For me, liberalism simply means, live and let live,” he wrote). But in the Saudi monarchy, as in the Islamic State, these views are unthinkable.

Badawi narrowly avoided the charge of “apostasy” — abandonment of the religion of Islam — which carries the death penalty. Instead, he was convicted of “insulting Islam through electronic channels.” The sentence: ten years in jail, a fine of more than $250,000, and — in characteristically medieval fashion — 1,000 lashes.

Saudi Arabia subjugates all of its people, but a special living hell is reserved for women. The regime utterly infantilizes them. Infamously, they are forbidden from driving a car, and they may not leave home, nor travel abroad, nor obtain a passport, nor file legal claims without the permission of a male chaperon, known as a “guardian.” The guardian is usually a relative — a husband, father, brother, even a son. What kind of a life is that?

“I got into an accident once in a taxi,” reports one Saudi woman, “and the ambulance refused to take me to the hospital until my male guardian arrived. I had lost a lot of blood. If he didn’t arrive that minute, I would’ve been dead by now.”

One 30-year-old doctor says: “I’ve had to give up on a number of educational opportunities because he (my guardian) didn’t think a doctor needed a cultural exchange program or a symposium he didn’t understand. I’ve been trying to have him let me marry the man I love for the past two years. ... I’m in charge of people’s lives every day, but I can’t have my own life the way I want.” (The Saudi king has reportedly decided to adjust the guardianship system, only slightly loosening the chains that still bind Saudi women.)

Outside the home, patrols of the Saudi “morality police” have kept women in line, prowling sidewalks, parks, and shopping malls. These enforcers intimidate, fine, and beat women who improperly don their legally mandated veils.

The Saudi regime’s domination of women; the public executions of apostates; the floggings for blasphemers; the patrols of the morality police; the prohibition on buying or consuming alcohol; the subjugation of the individual under sharia law — all of that calls to mind the horror of daily life in Raqqa, a stronghold of Islamic State.

The comparison speaks to their essential similarity. Both regimes impose Islamic religious law as a total system. True, the two differ in some particulars: one is a monarchy, the other a self-styled “caliphate.” While both carry out horrific public executions, only one turns them into gruesome propaganda videos online. Saudi Arabia throws gay men in prison; the Islamic State throws them off rooftops. The Saudis spend millions on religious schools and books proselytizing its strain of Islamic totalitarianism worldwide; Islamic State spends a lot of time leveraging social media. Saudis fund the Taliban in Afghanistan; the Islamic state competes with the Taliban for control over turf. But what overwhelms these contrasts is a profound commonality: both are hostile to our ideals of reason, individualism, freedom.

For their own reasons, the Saudis hope for the defeat of Islamic State, and they oppose to the Middle East’s other Islamic totalitarian regime, Iran. But it’s perverse to ignore — and effectively whitewash — the Saudi regime’s own malignant character, though that has been U.S. policy for years. After the attacks of 9/11 (in which 15 of the hijackers were Saudis), President George W. Bush embraced the Saudi regime, even hosting a member of the ruling family at his Texas ranch. President Obama, who bowed to the Saudi king, continued to afford the regime its undeserved standing as our ally.

America’s policy toward Saudi Arabia betrays our values and enables a vicious regime. If President Trump cares about our founding ideal of individual rights, here’s a chance for him to deliver by breaking up the perverse U.S.-Saudi relationship.