GAZA CITY — A rare show of defiance against Hamas, the militant Palestinian group that controls Gaza, was quelled on Wednesday as men who appeared to be Hamas security officials beat some protesters and detained others, witnesses said.

Men in plainclothes believed to be Hamas security officials interrupted the demonstration, beat men and women with sticks and herded people into jeeps, said one protester, Fadi al-Sheikh Yousef. There were no reported injuries among the crowd, estimated at 150 to 200.

Palestinian activists in Gaza said the demonstration was meant as a call for political change and freedom. They said they also hoped that it would draw attention to the dire conditions they lived under, including unemployment, poverty and Israeli restrictions.

Hamas seized control of Gaza in 2007 and has crushed all opposition to its rule. The last demonstration against Hamas was more than four years ago.