BEFORE THE presidential election in 2000, George W. Bush was urged by an adviser to go after a category of voters who would love a business-friendly, socially-conservative message: Muslims. Mr Bush took the tip and it worked. In 2001, a survey of American Muslims (including those who cast no ballot or gave no clear answer) found that 42% reported voting for Mr Bush against 31% for his Democratic rival Al Gore. Among upwardly mobile Muslim immigrants, many of them professionals or entrepreneurs, the proportion voting Republican was much higher.

Now, however, with anti-Muslim sentiment ablaze among supporters of Donald Trump, and the president hardly discouraging it, that love-in is a distant memory. American Muslims are gaining political visibility, but only on the far left of the spectrum. Symptomatic of this shift is the election to the House of Representatives of two Muslim women (Rashida Tlaib and Ilhan Omar) who along with two female colleagues, also left-wing Democrats, have been taunted by Mr Trump and his supporters.

A huge change in Muslim sentiment was clear in the 2004 presidential race and confirmed by the 2008 contest won by Barack Obama. By 2007 some 63% of American Muslims at least “leaned towards” the Democrats, against only 11% for the Republicans. These figures have not changed very much since, according to Pew Research, a pollster. Among Muslims who voted in the 2016 presidential race, only 8% said they opted for Mr Trump (who had declared that “Islam hates us”) and 78% for Hillary Clinton.

Campaigners for Muslim political engagement reckoned that more than 1m were registered to vote in 2016, and that last year’s congressional elections saw an uptick in Muslims going to the polls. Pew estimates that about 3.5m Muslims live in America. At around 1% of the country’s population as of 2015, they were more numerous than Hindus (0.7%) or Buddhists (0.7%) though well outnumbered by Jews (1.8%). But that picture is projected to change fast with the Muslim share doubling by mid-century.

The main reasons for the transformation in Muslim attitudes have been much analysed. After the terrorist attacks of September 11 2001, there was a spate of hate crimes against followers of Islam and open antipathy towards Muslims emerged in a growing segment of the electorate. That put Muslim voters into a defensive frame of mind, and Democrats, with their embrace of cultural diversity, offered the safest haven. Another factor, though its importance is disputed, is that younger American Muslims have grown more liberal over cultural questions like gay rights, so they are less amenable to Republican-style “family values” arguments. As for African-American Muslims, they (like black Christians) have always been well to the left in their voting choices.

Still, to say that American Muslims have lurched from one end of the ideological spectrum to another would be an over-simplification. According to Youssef Chouhoud, a political scientist at Christopher Newport University, Muslims are not so much confirmed leftists as nomads, in search of anyone who will listen to them, and the only respectful attention they are getting is on the left. Even in that quarter, they have been feeling a bit unloved recently. At the convention on August 31st of the Islamic Society of North America (ISNA), which calls itself the country’s biggest Muslim organisation, only two candidates for the Democratic presidential nomination accepted invitations to speak: Senator Bernie Sanders and Julián Castro, a former housing secretary. Mr Sanders is also probably the most robust supporter of Palestinian rights in the primary field. As Mr Chouhoud puts it, this leaves Muslims “looking for a place they can feel wanted. Any politician who even talks to them will be appreciated.”

In this climate, Muslim Republicans are an endangered, though not extinct, species. One veteran of that cause is an Arizona-based doctor, Zuhdi Jasser. He has served as vice-chair of the United States Commission on International Religious Freedom, a bipartisan watchdog, as a Republican nominee. Although Mr Trump was not his preferred candidate, Dr Jasser declares himself “pleasantly surprised” by many of the Trump administration’s policies, and insists that “Muslim ban” is not an accurate way to describe the president’s drive to bar entry from five countries where Islam predominates.

Dr Jasser feels the “Muslim-equals-left” stereotype is partly the fault of his community’s self-appointed representatives, not so much the young firebrands as the community’s elderly godfathers. In his view, these veteran leaders have one big failing. They have never really distanced themselves from the global cause of Islamism, the notion that the only ideal form of governance is a Muslim one. (They are not, of course, proposing such a regime for America, but many have a record of endorsing political Islam elsewhere.) That soft spot for Islamism makes them particularly toxic in the eyes of mainstream American conservatives, leaving Muslims nowhere to go but left.

As he tours America addressing conservative groups, Dr Jasser finds them open to persuasion that the political doctrine of Islamism, which in his view can and must be separated from the spiritual teaching of Islam, is their real foe. He lays out the case that Islam as a set of metaphysical beliefs and ethical norms can flourish, in America and elswhere, under the principle of church-state separation which was dear to the Founding Fathers. Once that argument is made, his listeners are open to persuasion that decent American Muslims are allies against Islamism.

Whether or not they deserve to be dismissed as old-timers, America’s Muslim thought leaders, be they spiritual or political, are certainly divided. In ways that leave ordinary Muslim voters a bit baffled, they squabble among themselves, usually over events in distant lands. Arguments rage over the coup in Egypt in 2013, the failed coup in Turkey in 2016 and the civil war in Syria. At the core of many such disputes is a difference in attitudes to the global Muslim Brotherhood, as a standard-bearer of Islamism. In the words of H.A. Hellyer, an analyst for the Carnegie Endowment, “one of the fault-lines in the American Muslim intelligentsia is between those who see Islamism as the proper, basic norm of Muslim political life, and those who are philosophically opposed to it.”

Rank-and-file American Muslims may not have much time for philosophy but many will have felt some bewilderment in recent weeks as one of their most revered spiritual figures became embroiled in a row which has a domestic political dimension. Hamza Yusuf, a California-based greybeard, is often described as America’s most eminent scholar of Islam. In July he took a job, of sorts, with the Trump administration by joining a panel set up by the State Department to ponder the definition of human rights. Some said he was selling out to a Muslim-bashing administration; others that his warm relations with the United Arab Emirates, whose regime he calls tolerant, made him unqualified to pronounce on human rights. (The UAE is a declared foe of the Brotherhood, so views on that country are sensitive.) Mr Yusuf was already unpopular with left-wing co-religionists for saying after Mr Trump’s election that Muslims should accept his authority.

In recent days he has been much criticised for having spoken mockingly of the Syrian uprising that started in 2011. In a three-year-old video clip that suddenly went viral, he said the revolt had led to untold humiliation for Muslims. In a fresh video he apologised if his words had offended people who suffered under Syria’s regime.

Still, some advocates of a Muslim-Democratic coalition feel they can do fine without such prominent Muslims as Mr Yusuf. Despite the lack of interest shown by other Democrats, they took heart from Mr Sanders’s appearance at the ISNA convention and especially over one of his comments. He delighted Pakistani-Americans by saying he was “deeply concerned” about India’s “unacceptable” actions in Kashmir. That gave a hint of one foreign-policy issue which might loom rather large for south Asian voters in the 2020 race. Some Indian-Americans are impressed by Mr Trump’s friendship with Narendra Modi, India’s prime minister; many Pakistani-Americans hope a Democratic runner will take the other side.

Shadi Hamid, a fellow of the Brookings Institution, a think-tank, says the deepening partnership between Muslims and Democrats was built not on foreign-policy questions but more on adversity: the alarm created by the white-nativist spirit which they see stalking the country. Certain tensions do exist, he says, between the social conservatism of some Muslims and the ever more secular ethos of the Democrats. But for now, such tensions are kept under control by a common feeling of being endangered. If the Trump era passes, the Democratic coalition’s internal strains might come to the fore, but until that happens, a sense of being under siege will keep it together. Generally, Muslim voters are saying: “however secular the Democrats might be, it is the Democrats who have our backs.”