Cairo - When the Egyptian army trucks recently rolled towards the Rafah border, they carried a message on the side: "A gift from the Egyptian people."
Five hundred tonnes of aid were sent to the Gaza Strip on the orders of President Abdel Fattah el-Sisi, as dozens of Palestinians from Gaza passed in the opposite direction for much-needed medical treatment in Egyptian hospitals.
For some, it looked like a reaffirmation of Egypt's historic pan-Arabist commitment to the Palestinian cause. But amid Israel's current military operation in Gaza, wrangling over a possible ceasefire deal and growing anti-Hamas sentiments back in Egypt, some have doubted that commitment.
Members of Hamas and Islamic Jihad are scheduled to hold indirect talks in Cairo on Sunday to reach a ceasefire in Gaza, mediated by Egyptian and American negotiators. At least three representatives of the Palestinian factions were barred from entering Egypt through Rafah crossing on Saturday, while Israel has reportedly refused to negotiate directly with Hamas at the meetings in Cairo.
Although Egypt noticeably turned against Hamas after the overthrow of former Egyptian President Mohamed Morsi, the strained relationship has simmered for decades, Zack Gold, an adjunct fellow at the American Security Project, told Al Jazeera.
"Beginning in February 2013, the Egyptian government took a hard turn, framing the tunnels between Sinai and Gaza - and by extension Gaza - as a national security threat," Gold explained. "The policy changes and associated military actions happened quite suddenly, but they built on suspicion that the Salafi-jihadi attackers that killed 16 Egyptian soldiers [in Rafah] in August 2012 came from, or were at least aided by operatives in, Gaza."
The alleged connections between Hamas, violence in Sinai and armed groups such as Ansar Bayt al-Maqdis have never been verified. Some analysts say Hamas allows Gaza-based Salafist groups to collaborate with Sinai fighters, allegedly giving groups the green-light to train them, subject to conditions such as taking their operations outside Gaza.
Hamas has repeatedly and adamantly denied interfering in Egyptian internal affairs. However, Egyptian security officials maintain Hamas has a more hands-on approach, helping to coordinate attacks on Egyptian soil. A court is currently considering whether Hamas fighters helped Morsi break out of prison during the 2011 revolution.
The view that Hamas, which is affiliated with the Muslim Brotherhood, helped to destabilise Egypt grew after Morsi's ouster - along with incitement against Palestinians.
"The anti-Hamas and anti-Palestinian sentiment certainly further developed after Morsi's ouster, with Hamas being seen as an arm of the Brotherhood and being accused of numerous attacks and plots throughout Egypt," Gold said. "However, it should be remembered that the 'Gaza threatens Egypt' rhetoric began during Morsi's rule, at a time of general xenophobia throughout the country."
Oroub el-Abed, an academic who wrote the book Unprotected: Palestinians in Egypt Since 1948, says tensions date back to the 1978 assassination of Egyptian Culture Minister Youssef el-Sebai, allegedly by Palestinian extremists.
President Anwar Sadat subsequently passed administrative regulations 47 and 48, determining that regulations treating Palestinians as nationals should be revoked. Palestinians' ability to work or receive an education in Egypt were particularly affected. That same year, the Camp David Accords were signed between Israel and Egypt.
"According to the politics run by the state ever since the late 1970s, Palestinians are made to seem either like terrorists or as an unthankful group," Abed told Al Jazeera. "The space for sympathy with the Palestinians, particularly for those living in Egypt, has really been toned down since then."
While the Egyptian army facilitated aid transfers across Rafah crossing nearly two weeks ago, activists and politicians from Cairo were organising their own medical aid convoy to Gaza. On July 19, the army blocked their passing at the Balouza checkpoint in North Sinai.
Hany ElFouly, an Egyptian who joined the convoy, recounted fraught negotiations and threats of arrest at the roadside. "They told us to head back … [and] that they had orders not to let either us or the medicine pass."
The army reportedly proposed to store the aid at the health ministry stores in Ismailia, which activists refused. A second attempted aid convoy successfully reached the Gaza Strip on July 19.
ElFouly believes it is up to citizens, not the state, to rally for the Palestinian cause. "The system uses the anti-Brotherhood coverage against the Palestinian case and most people follow blindly," he said.
"As for the media, the hope for us is social media, because nobody else will get the message out about Gaza."
H A Hellyer, a nonresident fellow at the Royal United Services Institute in London and the Brookings Institution in Washington, said while the Egyptian population is still generally pro-Palestinian, anti-Muslim-Brotherhood sentiment has complicated the relationship.
"The Palestinian cause is not a subject of dispute among the broad population; Egyptians are generally very pro-Palestinian in that regard, and quite antipathetic to Israel," Hellyer told Al Jazeera. "That cuts across partisan lines - but the fact that Gaza is partially governed by Hamas, a Brotherhood affiliate, has caused at least some portions of the Egyptian intelligentsia to pause."
This has played out in the public and private media, doggedly opposed to the Brotherhood, Hellyer said. "Perhaps for the first time, it's meant that some, albeit isolated, figures in the Egyptian media have focused the criticism more at Hamas than on the Israeli bombardment - but the public mood has also pushed heavily back against them."
In his 1997 memoir of exile and return, I Saw Ramallah, Palestinian poet Mourid Barghouti described his transformation into one of Palestine's displaced persons. After the Six-Day War broke out in 1967 and Ramallah fell, Barghouti went into forced exile in Cairo, and later Europe, for three decades - effectively becoming a stranger to his homeland.
"The stranger … does not care for the details that concern the people of the country he finds himself in or for their 'domestic' policy. But he is the first to feel its consequences," Barghouti wrote. "He is always afraid when they are afraid. He is always the 'infiltrating element' in demonstrations, even if he never left his house that day."
Some Palestinians in Cairo today feel much the same.
Mahmoud Sameh was born in Egypt, but his mother's side of the family is Palestinian, from Nablus, a large city in the occupied West Bank. He runs the Palestinian Youth Choir in Cairo, which aims to spread awareness of the Palestinian struggle and identity in Egypt. This past May, as the choir sang an old Palestinian song to mark Nakba Day, police showed up outside the building to ensure "we would not enter the streets and raise our voices", he said.
"Under [former President Gamal Abdel] Nasser, a lot of the Palestinians here always focused on going home one day. But after Sadat, things turned against the Palestinians," Mahmoud told Al Jazeera, noting the sense of Palestinian identity and solidarity in Egypt has faded.
"People don't say ... but you can feel it," he said. "The Palestinian view of the struggle, here in Egypt, is loss."