An annual Gaza marathon organised by the United Nations has been cancelled after a Hamas decision to ban women from competing alongside men.

The UN agency for Palestinian refugees (Unrwa) issued a statement on Tuesday cancelling the race on 10 April and expressing its disappointment at the new and intractable position of the Gaza authorities, which have permitted women to run alongside men for the past two years.

Chris Gunness, Unrwa's spokesman, said: "It is with sadness and regret that we have been forced to make this decision. But our work in Gaza is based on UN values, standards and codes of conduct and we could not go ahead with an event from which women were barred."

In a brief text message sent to journalists, Hamas said that the decision to scrap the event had been Unrwa's; Hamas officials had asked the UN agency to ensure that Gaza's local customs were respected.

The marathon, which raises money for Unrwa's summer programme in Gaza, would have been the territory's third. Almost half of the international runners who had signed up for this year's race were women. Of the 551 local Palestinians registered, 266 were women.

Jumana al-Shihri, a 30-year-old schoolteacher, ran in last year's race. "I faced harassment last time from society around me and I was expecting the same this time but I decided to do it and not pay attention," she said.

"I am surprised by the Hamas government decision to stop our participation; I don't find any problem as we are well dressed while running in the street, and the idea of it is to bring support to the Palestinians in Gaza when internationals participate in it also. I want officials to rethink this wrong decision."

Hamas, the Islamist movement that has governed the territory since 2006, has previously attempted to restrict the behaviour of Palestinian women, including a ban on smoking shisha pipes in public and insisting that female lawyers wear a hijab in court, but these rulings were retracted following criticism from human rights and international organisations.

Mona Shawa, a women's rights expert at the Palestinian Centre for Human Rights in Gaza, said that in the deeply conservative society where most women choose to cover their heads, many women would agree that it was inappropriate for women and men to compete together in public.

Even so, she added: "This is a very bad sign. It gives us a clear indication of how Hamas views women and the role it wants them to play in society. It is frustrating and a worrying indication of things to come.

"Gaza's women need to raise their voices against this."

A British diplomat, speaking on condition of anonymity, said: "Hamas has withstood two major assaults by the most powerful army in the Middle East and six years of blockade – they have been emboldened. This decision is a barometer of changes in Gaza, and a sign of a weakened Palestinian Authority in Ramallah."

Samir Awwad, a professor of political science at Bir Zeit University in the West Bank, believes Hamas is attempting to reassert its authority by tightening its control over the population, pointing to a recent Fatah rally in Gaza that drew tens of thousands of supporters and Egyptian attempts to shut down Hamas' lucrative smuggling through tunnels under the border with Egypt.

"For the time being, Hamas has absolute power in Gaza and this has not been challenged – not even by Israel. They want to show they can get away with anything," Awwad suggested. "But it is my belief that the Palestinians who are educated and cultured will not let them."