Crowds of angry ultra-Orthodox Jewish men, wearing long beards, black and white garb and large black hats, protested in the streets of Jerusalem earlier this month against a new cinema opening its doors on the Sabbath.

The demonstration was meant to be a show of strength in a long-running dispute over the role of strict Jewish law in the cultural life of Jerusalem. But in many ways, it was also a sign of desperation after a series of gains by the city's secular community in recent years.

"No one's saying we're giving up," said Shmuel Poppenheim, an unofficial spokesman for the ultra-Orthodox community. But, he conceded, "We know it's a lost cause. ... We know that we can't stage a war" over every new establishment open on the Sabbath.

Despite Jerusalem's image as a city that grinds to a halt on the Sabbath, which runs from sundown Friday to sundown Saturday, more than 200 cafes, restaurants, bars, cinemas, museums, cultural institutions and other entertainment centers now stay open in non-religious Jewish areas of the city.

That is a major shift over the last 30 years from a time when only a handful of establishments stayed open and a law forbade cinemas from operating on the Sabbath. The "Yes Planet" cinema that drew the recent protests was the second major destination to open with Sabbath hours in the past two years, after a former train station reopened as a commercial center in 2013.

These initiatives have contributed to the most notable shift in secular-religious relations since the early 1990s, said Shahar Ilan of Hiddush, a group that advocates for religious equality.

For decades ultra-Orthodox communities have flexed their political muscle, sometimes violently, to keep workplaces, businesses and government institutions in Jerusalem's Jewish neighborhoods shut down for the Sabbath.

While most Jewish Israelis are secular, Israel's founding fathers gave Judaism a formal place in the country's affairs, and Orthodox rabbis strictly govern religious events such as weddings, divorces and burials for the Jewish population. The ultra-Orthodox also are perennial kingmakers in Israeli coalition politics, though they make up only about 10 percent of the country's population.

Their influence is especially pronounced in Jerusalem, where their numbers are proportionally much larger than the national average. Jerusalem is split almost evenly into thirds between secular and modern Orthodox residents, Muslim Palestinians and ultra-Orthodox Jews who live in insular enclaves.

Jerusalem's ultra-Orthodox communities also traditionally have held significant power in the municipal government. They are bolstered by laws and unwritten agreements that grant them certain protections, such as barriers to prevent cars from driving through religious areas on the Sabbath, said Menachem Friedman, a professor of Judaism at Bar Ilan University.

Attempts to change Jerusalem's delicate balance have prompted violent backlashes from the ultra-Orthodox, who have blocked roads, clashed with police and sent tens of thousands of activists into the streets on their rabbis' orders.

But Friedman said that contrary to the popular perception, the traditional power of the ultra-Orthodox is waning in areas where they are not a demographic majority due to changing geographic and economic pressures.

Jerusalem's ultra-Orthodox communities are often poor and depend on government handouts because men traditionally study in religious seminaries rather than work. With the cost of living in Jerusalem on the rise, younger members of the communities are increasingly moving out, while public support for their substantial financial aid is waning, Friedman said.

This month's protests over the Yes Planet cinema complex were therefore more "symbolic" opposition rather than a real concerted fight, Friedman said. The cinema is located in Abu Tor, a mixed Jewish-Arab neighborhood far from the city's ultra-Orthodox areas.

On the first night of protests on Aug. 14, several thousand ultra-Orthodox rioted in West Jerusalem, breaking windows and prompting police arrests. But the following evening, just a few hundred demonstrators bothered to show up.

It was a vivid contrast to weekly riots that rocked the city in 2009 when City Hall allowed a parking lot near Jerusalem's Old City to open on the Sabbath to serve tourists.

The train station-turned-mall known as "First Station," meanwhile, has remained open on the Sabbath without any protests for more than two years now.

The battle is far from over. A week after Yes Planet opened, the municipality ordered eight minimarkets in Jerusalem's city center that now operate on weekends to close.

City councilman Ofer Berkovitz, a vocal secular activist, accused Mayor Nir Barkat of making the move to compensate for the new cinema — a charge the mayor denies.

In another recent case, political pressure prevented a popular cafe chain from opening a new branch in Jerusalem's Independence Park, which is government property.

Since a restaurant cannot receive a kosher license if it is open on the Sabbath, Israel's official licensing body threatened to revoke Landwer Cafe's certificate nationwide if the new branch opened on the Sabbath, Berkovitz said. The same owner opened a coffee shop under a different name that operates on the Sabbath.

The municipality also has refused to allow another cinema complex, Cinema City, to open on the Sabbath because it is built on property leased by the city. Berkovitz and other city council members appealed to the Supreme Court but lost.

Barkat said in an email statement that "there is no change in the law or the status quo which has been accepted throughout the years in Jerusalem according to which cinemas, places of entertainment and restaurants operate on the Sabbath and there is no trade or public transportation."

Rabbi Uri Regev of Hiddush said the city has an "inconsistent" policy when it comes to regulating Sabbath activities. "There is no status quo," Regev said, saying these policies remain in flux and are "not divinely inspired."