When Spanish giants Real Madrid and FC Barcelona clashed this weekend, two matches separated by thousands of kilometers were played, one on and one off the pitch. The Spanish clash ended in a draw in Barcelona’s Camp Nou stadium; a rare show of public defiance to Gaza’s Hamas rulers ended with a victory for what amounted to Palestinians rejecting the Islamists’ call for a boycott of the popular Catalan champion.

The Spanish derby turned into an inter-Palestinian clash of wills as well as a rejection of the Palestinian struggle for statehood against Israel becoming the determining factor of their daily lives when Barcelona extended an invitation to Israeli soldier Gilat Shalit to attend the match.

Mr. Shalit was exchanged last year after five years in Hamas captivity in a prisoner exchange swap in which Israel’s released more than a 1,000 Palestinians to Hamas in a deal that boosted the Islamists’ fortunes at the expense of Palestinian President Mahmoud Abbas’s authority on the West Bank.

That victory has now turned into an own goal with Palestinian soccer officials rejecting a call by Hamas to boycott the match and scores of Palestinians in Gaza publicly defying a Hamas order not to watch the match on television.

Hamas’s setback comes as the group, which wrenched control of the Gaza Strip from Mr. Abbas’s Al Fatah movement in 2007 and split the Palestinian national movement, is on the defensive. A Hamas decision to boycott this month’s municipal elections on the West Bank, has all but paved the way for a Fatah victory. A Human Rights Watch report last week accused Hamas of subjecting Palestinians to serious abuses of justice, including torture, arbitrary arrest and unfair trials. Hamas has denied the allegations.

Hamas is also facing increased charges of widespread corruption, fraud and extortion, making it difficult for the movement to capitalize on protests in the West Bank against and discontent with the economic policies of Mr. Abbas’s government.

Hamas’s boycott of Barcelona targeted what is perhaps the most popular European club in Gaza as well as the West Bank, boosted by recent reports that Catalonia may seek independence from crisis-ridden Spain. "We can identify with the Catalans and their struggle against the great power of Madrid, like the way we struggle against Israel," the BBC quoted a Palestinian soccer fan as saying.

Writing on the BBC’s website, Gaza correspondent Jon Donnison said that “Barcelona Football Club arguably brings more joy to Palestinians than any other institution in the world. That's certainly my impression after almost three years in Gaza and the West Bank. Every time the Catalans take to the field you can guarantee you'll struggle to get a table in the bars of Ramallah and the shisha-infused coffee shops of Gaza City. On match day tradesmen touting maroon and gold Barca jerseys set up shop at Qalandia, the traffic-infested Israeli military checkpoint that separates Ramallah from East Jerusalem.”

The Hamas boycott was sparked, according to Barcelona, when it acceded to an Israeli request to allow Mr. Shalit, an avid soccer fan, to attend this weekend’s derby. The club soon realized that nothing in the Middle East is shielded from politics.

To squash protests at an early stage, Barcelona quickly extended invitations to three Palestinians: Palestinian Football Association president and Al Fatah member Jibril Rajoub, Mr. Abbas’s ambassador to Spain, Musa Amer Odeh, and popular national team soccer player Mahmoud Sarsak who was released from three years in Israeli prison earlier this year under pressure from world soccer body FIFA and Europe’s governing football group UEFA after he went on a three-month hunger strike. Mr. Sarsak was never charged with an offense but was suspected to be a member of the militant, Gaza-based group, Islamic Jihad.

Messrs Rajoub and Abu Odeh appear despite mounting disillusion with Al Fatah to have been more in tune with the popular mood when they announced that they would accept Barcelona’s invitation and not join the Hamas boycott. Mr. Sarsak by contrast said that he would "refuse to sit in the same place with a killer who came on a military tank. I respect Barcelona's invitation, but I have to avoid angering the Palestinian people and their supporters as well as all those who supported me during my hunger strike." Mr. Sarsak acknowledged however that many Palestinians felt he should have accepted the Barcelona invitation to highlight Palestinian suffering and turn the clash between the Spanish giants into an Israeli-Palestinian confrontation.

To be sure, Mr. Sarsak may have been in a no-win situation. His attendance of the Spanish derby alongside Mr. Shalit could well have sparked Palestinian criticism. By the same token, his boycott in line with Hamas and Islamic Jihad policy certainly failed to strike a popular cord with Palestinians.

A small group of former prisoners wearing Barcelona and Real Madrid shirts kicked a soccer ball around on a forlorn Gaza field in protest against Mr. Shalit’s attendance of the derby. "Soccer is a sport that carries the message of freedom and love but we are against it when a soldier is invited, because it equates between the victim and the aggressor," said Yasser Saleh, who spent 17 years in Israeli jails.

Nonetheless, Hamas’s boycott call offered Palestinians a rare opportunity to vote with their feet against continued entrenched, feuding Palestinian groups that have proven unable to further national aspirations or improve economic conditions. The Palestinian show of defiance came against the backdrop of an Israeli-Palestinian peace process virtually that is dead, the faltering of revived Palestinian efforts to gain some form of recognition of statehood at last month’s United Nations general assembly in New York, and widespread economic discontent in both the West Bank and Gaza.

"I watch football and support Barcelona, because I see only sports, I don't see politics - I won't allow for Israel to deny us from this fun time,” said defiant Palestinian Barcelona fan Nasser Ziad.

In a strip where children wear imitation Barcelona blue-and-red jerseys and Barcelona victories spark wild cheering and car honking, coffee shops were filled on Sunday to the rim as Palestinians ignored the Hamas boycott and gathered to watch their favorite team play on large television screens. “We shouldn’t stay at home. We should be out their cheering our team and waving the Palestinian flag for all to see,” said one defiant Barcelona fan.