Hundreds of thousands of ultra-Orthodox Jews took to the streets here Sunday afternoon to express anger over attempts by Israel’s political leaders to force them to serve in the military.

Local media outlets estimated crowds at the “million-man march” to number more than 300,000, while organizers put the figure closer to 500,000. Police did not provide an exact figure, but spokesman Micky Rosenfeld said hundreds of thousands of men, women and children were present. It was one of the largest demonstrations in the country since 2011, when about 200,000 Israelis protested the high cost of living.

Sunday’s demonstration, which took place in and around the crowded ultra-Orthodox neighborhoods at the entrance to Jerusalem, brought traffic and public transport to a standstill and forced schools to close early as thousands flooded the city.

The issue of drafting young ultra-­Orthodox males who are currently exempt from military service has intensified in recent weeks as members of Prime Minister Benjamin Netanyahu’s ruling coalition work to finalize legislation for a universal draft.

Ultra-Orthodox men — or Haredim, as they are referred to here — are almost universally exempt from military or national service as long as they are enrolled in yeshivas to study the Torah, as almost all of them are, or at least claim to be. The new law seeks to end those deferments, as well as some financial benefits that go along with them.

The two-hour protest, which kicked off with a mass prayer service, was peaceful. Some of the Haredi protesters, dressed in their signature black hats and long black jackets, waved signs in Hebrew and English accusing the government of trying to suppress religion. Others quietly recited psalms calling for divine intervention.

In the rally’s closing moments, organizers issued an edict that Haredim should resist all attempts by the state to draft them.

Nachman Ben-Yehuda, a professor at Hebrew University, explained that at the core of Sunday’s protest is the belief that studying scriptures should come above all else, including serving in the army.

“They say the world and the Jewish people are saved because they study the scriptures,” he said.

Although a small number of ultra-Orthodox do serve in the army, such service is greatly frowned upon, and those who enlist are sometimes spat on or accosted when they return to their neighborhoods dressed in military uniforms.

The previous law exempting the ultra-Orthodox from military service expired in 2012, and new legislation to enlist all Israeli men and women ages 18 to 22 has been in the works since last summer, when it received initial approval from the Israeli cabinet.

Since then, the legislation has been the subject of fierce debate in the Knesset, Israel’s parliament. Last month, the bill passed its first reading and was heralded by proponents as a game-changing step for Israeli society.

“This is a historic law, which will save Israel’s economy and integrate Haredim into the workforce,” said Knesset member Ayelet Shaked, chairwoman of the committee overseeing the bill.

“In a month from now, every Haredi youth will receive a draft order. Whoever does not enlist will do civil service in the fire department, MDA paramedics or aiding the elderly. Sharing the burden is not an attempt to pick on Haredim or their lifestyles. We are truly committed to aiding them extract themselves from the vicious cycle of poverty,” said Finance Minister Yair Lapid, who ran on a secular platform in the 2013 elections.

But the draft law has been harshly criticized by ultra-Orthodox leaders in and outside the parliament. Haredi Knesset member Meir Porush accused Netanyahu of selling out the ultra-Orthodox by supporting one of the law’s central facets — criminal sanctions against those who refuse to enlist.

Leaders of the country’s three rabbinic councils, which represent thousands of people affiliated with the mainstream Haredi movements, met last week for the first time at a historic emergency meeting to discuss the bill. They called for Sunday’s mass protest as a show of force against what they deemed “criminalizing Torah study.”

The law and even the attempts to put it in place mark a significant challenge to the religious-secular status quo established by Israel’s first prime minister, David Ben-Gurion, in the 1950s. Back then, Ben-Gurion struck a deal with Haredi rabbis allowing believers to study rather than fight, in an attempt to rebuild the world of Torah study destroyed by the Holocaust.

At first, the numbers of those receiving army exemptions was relatively small, but the numbers have steadily increased, with hundreds of thousands of young ultra-Orthodox Jews still not required to serve in the military.