While Bahrain imprisons political activists and rights advocates at home, it also participates in the American-led coalition against the Islamic State. The bitter irony of this is that the Islamic State’s Bahraini recruits come not from among the government’s opponents, but from within its own ranks.

Unlike the United States, Britain and France, where typically the Islamic State recruits among alienated young people, in Bahrain the group finds willing jihadists in the establishment. The most prominent Bahraini member of the Islamic State, the terrorist preacher Turki al-Binali, comes from a family closely allied with the Khalifa royal family. Other recruits have come directly from the security forces of Bahrain. (Mr. Rajab, the human rights advocate, was imprisoned for six months recently for pointing out links between the Bahraini military and the Islamic State.)

Another Binali family member who has defected to the Islamic State, Mohamed Isa al-Binali, is a former Interior Ministry officer. He worked in Jaw Prison, a facility notorious for overcrowding and harsh conditions. One former prisoner told me that he’d witnessed Mr. Binali overseeing the ill treatment of juvenile Shiite inmates, not long before Mr. Binali disappeared in 2014 to join the Islamic State.

Mr. Binali was acclimated to violence and hatred in Bahrain’s prison system. This is not something Bahrain will ever admit to: For the government, the embarrassment is too great. But until it does, it cannot possibly combat extremism effectively at home.

This is an extremism of its own making, born out of the destruction of Shiite mosques and the sectarian language that many in government use — as Sheikh Khalid does — in an attempt to undermine the credibility of the democratic opposition. Bahrain, I fear, is heading in the direction of Saudi Arabia, where radical Salafism has fostered sectarianism and terrorism.

On Jan. 31, I discovered that my Bahraini citizenship had been revoked when I woke in London to find my name on a list published by the Bahrain News Agency. Alongside mine were the names of some 50 other activists, journalists and political figures — as well as those of about 20 affiliates of the Islamic State and Al Qaeda, including Turki al-Binali and Mohamed al-Binali.

The reasons for revocation ranged from serious terrorism charges to “advocating regime change.” The message could not be clearer: For Bahrain, my human rights work was equivalent to terrorism.

How can a country that willfully refuses to differentiate between peaceful calls for democratic rights and terrorism deal with sectarian extremism? Earlier this year, President Obama promised to have the necessary “tough conversation” about these issues with Persian Gulf state allies. Yet Mr. Kerry just gave Bahrain a pass on the sectarianism at home that is feeding the Islamic State abroad.