She is Naama Margolese, 8, the daughter of American immigrants who are observant modern Orthodox Jews. An Israeli weekend television program told the story of how Naama had become terrified of walking to her elementary school here after ultra-Orthodox men spit on her, insulted her and called her a prostitute because her modest dress did not adhere exactly to their more rigorous dress code.

The country was outraged. Naama's picture has appeared on the front pages of all the major Israeli newspapers. While Prime Minister Benjamin Netanyahu insisted Sunday that "Israel is a democratic, Western, liberal state" and pledged that "the public sphere in Israel will be open and safe for all," there have been days of confrontation at focal points of friction here.

Ultra-Orthodox men and boys from the most stringent sects have hurled rocks and eggs at the police and journalists, shouting "Nazis" at the security forces and assailing female reporters with epithets like "shikse," a derogatory Yiddish term for a non-Jewish woman or girl, and "whore." Jews of varying degrees of orthodoxy and secularity headed to Beit Shemesh on Tuesday evening to join local residents in a protest numbering in the thousands against religious violence and fanaticism.

For many Israelis, this is not a fight over one little girl's walk to school. It is a struggle that could shape the future character and soul of the country, against ultra-Orthodox zealots who have been increasingly encroaching on the public sphere with their strict interpretation of modesty rules, enforcing gender segregation and the exclusion of women.

The battle has broadened and grown increasingly visible in recent weeks and months. Orthodox male soldiers walked out of a ceremony where female soldiers were singing, adhering to what they consider to be a religious prohibition against hearing a woman's voice; women have been challenging the seating arrangements on strictly "kosher" buses serving ultra-Orthodox neighborhoods and some inter-city routes, where female passengers are expected to sit at the back.

The virulent coercion in Beit Shemesh has been attributed mainly to a group of several hundred ultra-Orthodox extremists who came here from Jerusalem, known as the Sicarii, or daggermen, after a violent and stealthy faction of Jews who tried to expel the Romans in the decades before the destruction of Jerusalem in A.D. 70.

Religious extremism is hardly new to Israel, but the Sicarii and their bullying ilk push with a bold vigor that has yet to be fully explained. Certainly, Israel's coalition politics have allowed the ultra-Orthodox parties to wield disproportionate power beyond the roughly 10 percent of the population they currently represent.

The ultra-Orthodox community's rapidly increasing numbers — thanks to extraordinarily high birthrates — may also have emboldened the hard core, as may have their insular neighborhoods. And their leadership appears to lack moderating brakes.

In any case, the extremists have provoked an outpouring of opposition from all those who are more flexible, be they ultra-Orthodox, modern Orthodox, mainstream or secular. In fact, it was an ultra-Orthodox-led group that claimed at least part of the credit for making Naama's story public.

"We are working to save our city and to save our homes," said Dov Lipman, 40, a local activist, rabbi and self-defined modern ultra-Orthodox, who moved to Beit Shemesh from Silver Spring, Md., seven years ago. Seizing on the public mood of rejecting ultra-Orthodox bullying, Mr. Lipman and a group of supporters have been lobbying the Israeli Parliament, organizing protests and recently hired a media consultant. He said that is how Naama's story came out.

Built near the ruins of an ancient city of that name mentioned in the Bible, Beit Shemesh was established in 1950, first drawing mostly poor immigrants from North Africa, then immigrants from Russia, Ethiopia and English-speaking countries. With the construction of the new neighborhoods of Ramat Beit Shemesh A and B in the 1990s, the ultra-Orthodox population boomed. Residents say 20,000 more planned housing units are earmarked for the ultra-Orthodox.