The Islamic militant group claims it is willing to tolerate dissent, but the crackdown was the latest in a series of moves to squash opposing voices, including breaking up private parties Friday and Monday where people were singing songs of the rival Fatah movement.

After Hamas gunmen in the Gaza Strip routed forces loyal to President Mahmoud Abbas and Fatah in five days of fighting in June, the group declared an amnesty for former Fatah fighters.

Yet when Fatah and allied groups announced plans for Monday's rally, Hamas banned "all demonstrations and public gatherings" that do not have official permission.

However, about 300 people got past the militia cordon and demonstrated for 20 minutes, shouting "We want freedom. We want to raise our voice!"

Security officers arrested several demonstrators and then confiscated equipment from news photographers and cameramen trying to cover the arrests, including an Associated Press still camera.

Hamas squads also raided the Gaza offices of media organizations, looking for material from the rally.

Staffers at satellite broadcaster Al-Arabiyya said the militiamen seized a camera and videotape at their office.

The Palestinian journalists union urged its members to observe a three-day boycott of any events organized by the Hamas militia, known as the Executive Force, to protest its treatment of the media.

Saleh Nasser, a member of the small, leftist Democratic Front for the Liberation of Palestine who was at the rally, condemned Hamas' actions.

"Treating people in this way when they came to raise their voice in a peaceful demonstration is something that is condemned, rejected and cannot be accepted," he said. "We are astonished by the decision to ban demonstrations."

The Gaza fighting in June, during which about 100 people were killed and 500 wounded, deepened the already bitter political rivalry between Hamas and Fatah.

Following the Hamas takeover of Gaza, Abbas expelled Hamas from the Palestinian coalition government and formed a West Bank-based administration of moderates in its place.

Undeterred, deposed Prime Minister Ismail Haniyeh pledged to impose law and order in the formerly anarchic Gaza Strip. But his Executive Force is gaining a reputation for heavy-handedness, particularly when dealing with Fatah supporters.

On Friday, rifle-toting militiamen roared up to a bachelor party where revelers were dancing to Fatah songs. Video showed the Hamas men firing in the air to break up the celebration, clubbing guests, hurling chairs around and leaving one man lying unconscious.