Updated

Eight Palestinian protesters were wounded Saturday, including one pronounced brain dead, at a Hamas rally on the Egyptian border, medics said.

Tens of thousands of flag-waving Hamas supporters gathered at the Rafah border crossing with Egypt to demand it be reopened. The border, Gaza's only gateway to Egypt, has been shut since Hamas' bloody takeover of the Gaza Strip in June. Hamas charges that the government of Palestinian President Mahmoud Abbas does not want the crossing opened because that would help the Islamic group hold on to power in Gaza.

Hamas gunmen fired in the air as hundreds of protesters tried to rush the border terminal and attempted to infiltrate into Egypt. A teenager was shot in the head, and was later pronounced brain dead, medics said. Seven others were wounded by gunfire and trampling.

"This is a peaceful protest to voice our message that we are looking for freedom," said Issa Mashar, a top Hamas leader in Rafah. "We came to send a message from the people who are suffering."

But when hundreds of Hamas supporters tried to storm the crossing, Hamas militiamen staved them off by firing in the air.

Ashraf Abu Daya, one of the rally's organizers, appealed for calm from the crowd.

"There is no need to break into the crossing. The crossing is no longer under the occupation. The crossing is under the control of the Hamas Executive Committee," he said.

The Hamas takeover of the Gaza Strip in June triggered the closure of the border crossing, which had been run by Palestinian security with European supervision and Israeli security in the background.

Ihab al-Ghusain, a Hamas security spokesman, said its forces tried to prevent a few of the demonstrators from approaching the border with Egypt.

"A child was injured and he is in critical condition. We are investigating the incident to determine where the shot came from," he said.

Also Saturday, Hamas authorities set a hefty bail for the release of the Fatah activists it arrested following a Gaza protest rally, in yet another crackdown against its vanquished rival.

Hamas has been attempting to establish its authority in the Gaza Strip and thwart any forms of dissent since it overthrew Fatah in five days of fighting in June.

On Friday, Hamas men violently dispersed a crowd of Fatah protesters, firing in the air and beating demonstrators. Some 20 people were wounded in the clashes, including two French journalists and two children, according to doctors and witnesses. Scores of protesters were arrested.

The violence began at the end of a Fatah prayer session it held outdoors to protest against Hamas, which it says is persecuting its members in Hamas-controlled mosques.

The PLO Executive Committee, a top Fatah decision-making body, was meeting Saturday in Ramallah upon the request of Palestinian President Mahmoud Abbas to discuss Friday's clashes in Gaza. It was expected to denounce Hamas for its aggression against the Fatah protesters.

Fatah officials said 170 of its members remained in Hamas custody Saturday. Some of those released emerged from their arrest with their heads shaved — a humiliating gesture.

Hamas said it released most of those arrested and that only about 20 remained in detention.

But Hamas demanded a 1,000 shekel ($243, euro178) bail for the release, about a month's salary in the impoverished Gaza Strip, where 60 percent live under the poverty line.

"I consider this a theft. What is the crime I committed?" said Ahmad Siam, 33, whose father paid the sum for his freedom. "I didn't commit a crime to pay that money."

Al-Ghusain said the money would be reimbursed in six months if the offenders pledged not to resume "rioting or illegal activities."

"This is a legal measure. It is a way to bring the person to reconsider their action. Money might be the way to prevent these chaotic acts," he said.

The legal system in Gaza stopped functioning after Hamas took over the coastal strip in June. Abbas fired the Hamas-led government, formed a new government of moderates in the West Bank and ordered judges, prosecutors and police to stop cooperating with Gaza's new rulers.

Last week, Hamas appointed its own prosecution team in Gaza, which Saturday imposed the hefty bail.

Ibrahim Abu Naja, a Fatah official in Gaza, said his group would not pay up.

"This is a serious precedent," he said. "The decisions adopted are illegal. This is tantamount to occupation (laws)," he said, referring to Israel's rule over the Gaza Strip, which ended in 2005.

Khalil Abu Shamala, a human rights activist in Gaza, said both the detention and the bail demand were illegal.

"The whole legal system in Gaza is destroyed and defunct," he said. "On what basis can they arrest, detain, question and then set bail?"