Jerusalem's district court has upheld a ruling that Israeli security forces were wrong to arrest women who were praying at the Western Wall.
The ruling comes after five women were arrested at the wall, one Judaism's holiest sites, earlier this month.
They were part of a movement seeking to overturn a 2003 High Court ban on women performing religious rituals which Orthodox Jews say are reserved for men.
Police had appealed against an earlier ruling that the arrests were illegal.
The Western Wall - a relic of the Biblical Temple compound - currently has separate sections where men and women are allowed to pray.
For several months, a group of women, dubbed the Women of the Wall, have held prayers in the female side, wearing traditional shawls and reading aloud from the Torah.
'Liberated the wall'
This has sparked outrage and protests from Orthodox groups, who say women should not perform the rituals.
On 11 April, five of the women were arrested and charged with disturbing the peace. A lower court had dismissed the charges and the women were freed, but the police appealed against this.
But on Thursday, Judge Moshe Sobel rejected the appeal, saying that the 2003 ruling "did not ban the Women of the Wall from praying in any particular place" and that there was no "reasonable suspicion" that the women had broken laws relating to holy sites, Haaretz news agency reports.
He said police concerns that the women's actions could create a public disturbance was not grounds for arrest, as they had shown no signs of violence or being a security threat themselves.
Anat Hoffman, who chairs the women's group, said the ruling had "liberated the Western Wall for all Jewish people".
"We did it for the great diversity of Jews in the world, all of whom deserve to pray according to their belief and custom at the Western Wall," Haaretz quoted her as saying.
There was no immediate comment from police.
Correspondents say the dispute over the wall has become a symbol of the greater tensions in Israeli society between ultra-Orthodox Jews who abide by a very strict interpretation of Jewish law, and more modern Jewry.