Tara Todras-whitehill, Associated Press
Egyptian soldiers prevent a Palestinian woman from crossing the border between Gaza and Egypt in Rafah, Gaza, on Sunday. Egypt closed the border after a breach that allowed hundreds of thousands of Palestinians to cross freely for 12 days.

RAFAH, Gaza Strip — Egyptian police sealed Gaza's border with huge metal spikes and shipping containers Sunday, restoring a tight blockade after a breach that allowed hundreds of thousands of Palestinians to cross freely for 12 days.

Gaza's Hamas rulers are demanding new border arrangements that would give it a say in administration. But that looks doubtful with the international community opposed to any role for the Islamic militant group in running the crossing.

Gaza residents settled back into their dreary closure routine after joyous days of freedom and shopping that flooded the territory with sheep, smoked herring and fuel from Egypt.

"We're back to the same siege and the same problems," said Alaa al-Astal, 33, a security guard at a Gaza university.

"At least it (the breach) got me this," he added, proudly pointing to a Chinese-made motorbike he bought in Egypt for $1,000 in hopes of cutting the cost of his work commute in half.

Egypt warned Hamas against trying to open the border by force again, as it did on Jan. 23.

"Egypt is a respected state. Its border cannot be breached and its soldiers should not be lobbed with stones," said Suleiman Awwad, spokesman for Egyptian President Hosni Mubarak.

The border breach temporarily relieved a seven-month blockade, imposed by Israel and Egypt after Hamas seized Gaza by force in June.

The opening briefly boosted the popularity of Hamas, as hundreds of thousands of blockade-weary Gazans rushed to Egypt's border region, stocking up on supplies from dishwashing liquid to yeast, cigarettes, mattresses and cement.

On Sunday, the traffic slowed to a trickle as helmeted Egyptian border guards with plastic shields blocked the remaining border openings, allowing only Gazans and Egyptians who found themselves on the wrong side of the border to return home.

Dozens of Gazans crowded around the Egyptian forces, whose faces were protected by plastic visors.

"Egyptians only and those with visas for Egypt," shouted one burly guard, openly frustrated that Gazans were repeatedly trying to get to the other side despite the closure.

Bearded Hamas police worked in tandem with the Egyptians, trying to keep the crowd back. It was a marked change from several days ago, when uniformed Hamas men thwarted Egyptian attempts to reseal the border.

Israeli security officials said dozens of Palestinian militants who were trained in Iran, along with rockets and other weapons, crossed into Gaza from Egypt in the last few days.

Shin-Bet security chief Yuval Diskin told Israel's Cabinet on Sunday that "long range rockets, anti-aircraft and anti-tank missiles were brought into Gaza," according to a participant who spoke on condition of anonymity because the meeting was closed.

Hamas, meanwhile, appears to be running out of options for keeping the border open, as it pledged.

Another breach appears unlikely because Hamas cannot afford to alienate Egypt, its main conduit to the Arab world. If Hamas used force against Egyptian forces at the border now, it would be seen as a major provocation.

Yet a negotiated border deal also seems unlikely.

The international community is siding with Hamas' rival, moderate Palestinian President Mahmoud Abbas, who demands a return to a U.S.-backed 2005 border arrangement.

That would post EU monitors on the Palestinian side of the border, with Israel watching from a distance and given a final say over whether the border should open. Hamas wants Israel kept out of any border deal.

Gaza's Hamas strongman, Mahmoud Zahar, who led a Hamas delegation to Cairo over the weekend, acknowledged Sunday that there are disagreements with the Egyptians. Zahar suggested that Egypt is being pressured by the international community not to make a deal with Hamas.

"The border closed, and there are big issues between us and Egypt," Zahar told Hamas' Al Aqsa TV. The border with Egypt "is the only lung we can breathe through."

Meanwhile, the supplies from Egypt solved only some of Gaza's economic problems, and then only as a quick fix. Gaza still receives much of its fuel and electricity from Israel, which last month further restricted fuel shipments in response to a barrage of rockets from Gaza.

"The Palestinian people didn't benefit at all from the opening," said Wissam Abu Sharaf, a 26-year-old civil servant, as he waited at the border crossing for relatives to return from Egypt. "If the Egyptians were to serve the Palestinian people, they'd provide gas and fuel."

Still, the last two weeks have changed the look of Gaza.

Huge piles of scrap metal that lined the main-north south road for months have shrunk considerably. Originally intended for Israel, they rusted during the border closures but were quickly snapped up during the breach by Egyptian traders.

Outdoor markets were crowded with more goods on display than before the breach, and motorcycles, once a rarity in Gaza, were suddenly everywhere. Al-Astal, the security guard, took his new motorcycle to mechanic Azaa Khatab, who checked an electrical problem.

Khatab, who used to repair motorcycles in Tel Aviv, said he's already fixed two dozen Chinese-made bikes, and expects lively business in coming months.

Like many in Gaza, he also expected the border to reopen soon, saying that Gazans would not be denied after tasting a little freedom.

"I don't think they can close the border again," he said. "You can't stop people."