IN ASSEMBLING a coalition to fight the Islamic State, President Obama has moved swiftly to shore up shaky U.S. relations with Arab states. The effort has been remarkably successful: Encouraged by the abrupt reversal of Mr. Obama’s previous policy of disengaging from the region, Saudi Arabia, Jordan, and three Persian Gulf nations have joined the air campaign in Iraq and Syria, while other governments are offering intelligence or political support. The solidarity is politically important, particularly as it transcends the sectarian conflict polarizing the Middle East. The allies are ruled by Sunni governments that are showing themselves willing to fight Sunni extremists, even if the beneficiaries may include Shiite Iran and the Alawite regime of Syria’s Bashar al-Assad.

Mr. Obama’s outreach nevertheless has costs — among them a softening of U.S. pressure on regimes that responded to the Arab Spring’s demand for democratic change with brutal repression. Chief among them are Egypt, whose military-backed ruler secured one of the few one-on-one meetings Mr. Obama held at the United Nations last week, and Bahrain, which was allowed to join the military alliance in spite of its flagrant rejection of recent U.S. efforts to promote a domestic political dialogue. The rewards have not only been political: Defense Secretary Chuck Hagel informed his Egyptian counterpart that the United States would soon deliver 10 Apache helicopters that had been held up because of concerns over Egypt’s human rights violations, even though Cairo is not participating in the air strikes.

Mr. Obama’s decision to meet with Gen. Abdel Fatah al-Sissi provoked understandable dismay among the U.S. foreign policy and human rights experts in the Working Group on Egypt, who told the president in a letter that “whatever assistance [Mr. Sissi] may or may not provide in the fight against violent extremism in the region is already outweighed by the radicalism and instability he is cultivating every day in Egypt through his oppressive policies.” In a separate statement, Brian Dooley of Human Rights First pointed out that “the Obama administration is bolstering” the Bahraini regime shortly after it expelled a senior State Department official who met with a legal opposition party, refused entry to U.S. Rep. Jim McGovern (D-Mass.) and arrested human rights activist Maryam al-Khawaja, whose work has been won awards from two U.S. human rights organizations.

Mr. Obama acknowledged the tension between his national security objectives and human rights in a speech to the Clinton Global Initiative last week and pledged that “although it sometimes causes friction, the United States will not stop . . . pushing governments to uphold those rights and freedoms.” That speech included several mentions of Egypt, including of imprisoned democracy activist Ahmed Maher, and a White House briefing on Mr. Obama’s subsequent meeting with Mr. Sissi said he “discussed our ongoing concerns about Egypt’s political trajectory” and “raised a number of specific concerns that we have related to human rights,” including the imprisonment of several journalists.

Such presidential lobbying is important and can make a difference — as Egyptian political prisoners released under pressure from the George W. Bush administration can testify. But Mr. Obama should also recognize a lesson Mr. Bush drew following the attacks of Sept. 11: While it may be tactically useful in campaigns like that against the Islamic State, alliance with repressive Arab regimes ultimately does more harm than good to U.S. strategic interests.