This is an archived article that was published on sltrib.com in 2012, and information in the article may be outdated. It is provided only for personal research purposes and may not be reprinted.

Gaza City, Gaza Strip • The weekend's deadly attack on the Egypt-Israel border by Islamic militants with purported ties to Gaza spells trouble for the territory's Hamas rulers.

Hamas had lobbied Egypt's new president, who like the group has roots in the region-wide Muslim Brotherhood, to end Gaza's 5-year-long border blockade by throwing open a shared border crossing that is the territory's only gate to the world.

Instead, one of the first steps President Mohammed Morsi took after Sunday's attack was to slam the Gaza border crossing shut indefinitely.

Egypt's military said the attackers had the help of Palestinian militants, saying "elements from the Gaza Strip" aided them by shelling the Egyptian-Israeli border crossing with mortars as the attack was taking place.

An Egyptian government official charged anonymously that at least some of the attackers came from Gaza, infiltrating through smuggling tunnels under the border.

Hundreds of tunnels run under the 9-mile Gaza-Egypt border, dug over the years to evade border restrictions and move contraband, including weapons and militants.

Hamas announced it closed the tunnels temporarily following the attack that left 16 Egyptian border troops dead. Egypt indicated it would crack down from its side after mostly ignoring the underground passages for years.

Morsi pledged that now, Egypt's military will go after the militants in the Sinai, a move that could reinforce Gaza's isolation.

After Morsi's election victory earlier this summer, Hamas had been hopeful that the Gaza border blockade — imposed by Israel and Egypt after Hamas overran the territory in 2007 — was coming to an end.

In a meeting with Hamas officials from Gaza last month, Morsi appeared sympathetic to their demands to lift restrictions on travel out of Gaza, though he was noncommittal about opening the border to trade as well.

In return, Morsi asked Hamas to crack down on militants moving in and out of Gaza through the tunnels, according to an official close to the talks who spoke on condition of anonymity because he was not authorized to discuss the content of closed-door discussions with reporters.

Morsi told Hamas his leadership would be tested by how he deals with Islamic militants in Sinai and asked Hamas to help make his first term a success, the official said.

The bloody attack on the border that left 16 Egyptian soldiers dead threw the implied agreements into disarray. It also left Hamas in a damage-control mode, with few options beyond pleading for a fair inquiry.

The Hamas government condemned the attack as an "awful crime" and promised to help Egypt find the culprits, but also denied Gaza militants were involved. "We reject using the name of Gaza (in the context of the attack) without investigation and without finding out who is standing behind it," said Deputy Prime Minister Mohammed Awad.

A senior Egyptian official alleged that Hamas has failed to prevent militants from slipping in and out of the Sinai desert through the tunnels. "After Egyptian blood was spilled, we will not accept words of condemnation, denials or failing to take responsibility," the official said of Hamas, speaking on condition of anonymity because he was not authorized to discuss internal government deliberations with reporters.

In a first sign of tension between Morsi's' government and Hamas, the movement's deputy leader, Moussa Abu Marzouk, wrote on his Facebook page that closing the Rafah crossing amounted to collective punishment.

Since taking office, Morsi has been careful to avoid the impression that he puts the interests of fellow Islamists, including Hamas, above those of Egypt. After Sunday's attack, he is under even greater pressure to clamp down on Islamic militants seen as a threat to his country's national interests.

"Hamas will be the first to pay the price of this attack, and I think the ones who carried it out meant to embarrass Hamas," said Abdel Majed Swailem, a West Bank analyst. "Egypt is going to be very tough on the borders and that will harm Hamas' standing. The first target for Egypt now will be the tunnels, the main artery for Hamas."

Hamas, itself a fundamentalist Islamic militant group, appears to be losing control over some of the Islamist militants operating from its territory.

In recent years, followers of a fundamentalist stream of Islam, known as Salafis, have formed a number of cells in Gaza, some of them inspired by al-Qaida, but without central organization. They have claimed responsibility for several attacks on Israel.

A senior Hamas official on Monday described the Salafi cells as "ticking bombs that threaten not only the Gaza government." He spoke on condition of anonymity because he was not authorized to discuss intelligence assessments with reporters. Hamas has arrested suspected Salafis in the past, even clashing with them in shootouts on some occasions.

A former Israeli deputy military chief, Maj. Gen. Dan Harel, did not expect Hamas to go after militant groups. "They condemn it, but they don't do enough to control those extremist movements and terror organizations," he said.