They sat on either end of the congressmen’s couch, one a Jewish healthcare executive whose parents fled Germany in 1936, the other the Kashmiri Muslim chairman of a well-known American furniture chain. The men, Stanley Bergman and Farooq Kathwari, came to draw attention to an outbreak of hate crimes. But Bergman and Kathwari hoped their joint appearance would also send a broader message: that U.S. Jews and Muslims could put aside differences and work together.

“What drove us was the growing prejudice that has emerged in the United States,” Bergman said. “What starts small, from a historical point of view, often grows into something big.”

The men lead the Muslim-Jewish Advisory Council, created last year by the American Jewish Committee and the Islamic Society of North America, amid a flowering of alliances between members of the two faiths. U.S. Muslim and Jewish groups have been trying for years to make common cause with mixed success, often derailed by deep divisions over Israel and the Palestinians.

But bigoted rhetoric and harassment targeting both religions since the presidential election has drawn people together. Jews have donated to repair mosques that were defaced or burned. Muslims raised money to repair vandalized Jewish cemeteries. Rabbis and imams marched together against President Donald Trump’s travel ban targeting majority Muslim countries.

“I would never have thought I would see some people in conversation, or anywhere near each other. Then I saw people on Facebook standing next to each other at protests — Muslims and Jews,” said Aziza Hasan, executive director of NewGround: A Muslim-Jewish Partnership for Change in Los Angeles, which has run community relationship-building programs for more than a decade.

Yet despite this surge of goodwill, questions remain about whether these new connections can endure. The sense of vulnerability Muslims and Jews share, and their need for allies at a difficult time, have not erased tensions that in the past have kept them apart.

“This is a start and we’ll see how it goes,” said Talat Othman, a financial industry executive and Muslim-Jewish Advisory Council member, who offered an Islamic prayer at the 2000 Republican National Convention. “We are hopeful.”

Jews and Muslims comprise the two largest non-Christian faith groups in the United States and have a long history of trying to work together.

The chancellor of the Jewish Theological Seminary in New York, the flagship institution of Conservative Judaism, initiated a dialogue with Muslims in 1956, according to documents in the school’s archive. Rabbi Jack Bemporad, a pioneer in Muslim-Jewish dialogue and founder the Center for Interreligious Understanding in New Jersey, said his efforts started in the 1970s when he led a Dallas synagogue and local imams started attending his weekly Bible classes.

Over the years, many initiatives on improving relations between the two faiths were organized internationally by governments and peace groups, while some American synagogues and mosques attempted to build friendships locally. Some progress was made, yet relations were often derailed when violence, war and policy disputes erupted in the Middle East.

In Los Angeles, Hasan said local discussions between Muslim and Jewish leaders would falter when participants from one faith would demand those of the other condemn an action in Israel and the Palestinian territories. “It would go back and forth, then eventually Jews asked Muslims to condemn something they couldn’t so they walked away from the table,” Hasan said.

Then came the Sept. 11 terrorist attacks, prompting a backlash against American Muslims, and efforts to create connections with Jews began moving “at warp speed,” said Rabbi Burton Visotzky, a Jewish Theological Seminary scholar and a longtime leader in Muslim-Jewish cooperation. Visotzky’s outreach has ranged from a 2008 global interfaith meeting convened by King Abdullah of Saudi Arabia to serving collard greens at a soup kitchen alongside members of a New York mosque.

Still, the deep divide over Israel and the Palestinians remained an obstacle. Some Jews and Muslims pledged to avoid any mention of the Mideast as they sought common ground. Others hit the issue up front, but their talks foundered. Yehuda Kurtzer, president of the Shalom Hartman Institute of North America, an educational organization with extensive interfaith programs, said U.S. Muslims and Jews, had become “proxy warriors” for conflicts thousands of miles away.

At the same time, advocates for building ties between the faiths regularly encountered skepticism or outright hostility from within their own communities. “Many Jews feel that Muslims around the world are a source of threat to Jews, then why be in dialogue?” Kurtzer said.

About six years ago, Bemporad organized a conference on Islamic and Jewish law, but the event was closed to the public, in part to avoid pushback against participants. “We had to break the ice somehow,” Bemporad said. “We thought the way we did it, you could be free to say whatever you wanted.”

He said religious leaders working on such projects are much more open now. Still, the growth of the boycott, divestment and sanctions movement against Israel and in support of the Palestinians has further complicated relations.

The movement, known as BDS, is decentralized and its supporters use different strategies, but many backers say interfaith dialogue with Zionists undermines the Palestinian cause. It has become common for American Jewish organizations to draw a hard line against working with backers of BDS — from any faith. Meanwhile, BDS activists consider it traitorous for Muslims to work with supporters of Israel.

This issue came to the fore over the Shalom Hartman Institute’s Muslim Leadership Initiative, which brings American Muslims to Israel to study Judaism and Zionism. Kurtzer said the first year of the program was kept “completely under the radar.” When the participants became known in 2014, Muslims who took part were accused of allowing themselves to be manipulated and violating BDS.

Among the participants was attorney Rabia Chaudry, a specialist in countering extremism and a longtime supporter of Palestinian rights. She acknowledged the risks from participating in the program, but said she did so hoping to find a new way forward. Last October, the Council of Islamic Organizations of Greater Chicago dropped plans to present her an achievement award because of her work with the Shalom Hartman Institute. Chaudry, now a member of the Muslim-Jewish Advisory Council, said she was not angry. “They felt terrible about it. They got even more criticism for rescinding it,” she said.

Since Trump’s election, members of both faiths seem more willing to set aside such differences as they work on civil rights and other issues, said Abdullah Antepli, who was the first Muslim chaplain at Duke University and is co-director of the Shalom Hartman Institute’s Muslim Leadership Initiative.

It’s impossible to know definitively whether harassment based on religion has increased. The FBI’s most recent data on hate crimes is from 2015. Still, the last year or so has seen some dramatic examples of bigotry, including the waves of phoned-in bomb threats to Jewish Community Centers around the country. Mosques in Florida and Texas were recently set on fire, and authorities were investigating whether the suspected arsons could be considered hate crimes.

“It’s particularly a Trump effect,” Antepli said. “External forces make the Muslim and Jewish communities need each other’s friendship.”

When New York Arab-American activist and BDS supporter Linda Sarsour recently helped raise more than $150,000 for the damaged Jewish cemeteries, some Jews debated whether it would be ethical to accept the donation. But in a sign of changing attitudes, several mainstream Jewish leaders who had worked with her previously defended her.

This new dynamic was evident at a recent New York vigil organized by the Sisterhood of Salaam Shalom, a national organization that brings together Muslim and Jewish women. The gathering at the Jewish Theological Seminary was part of the organization’s response to Trump’s travel ban. At their vigil, they walked to the front of the room in pairs — a Muslim and a Jew — to offer readings and prayers in Arabic and Hebrew. After the ceremony, the women hugged and posed together for selfies.

“There’s a sense of immediate rapport and connection,” said Donna Cephas, a national board member of the Sisterhood, which has added dozens of chapters in the past year. “There is a significant yearning to be in community with people who stand for what we stand for.”