The soldier wore green camouflage, a red beret and the serious expression of a man at war as he stood sentinel outside the heavy iron gates of a Jewish school in the heart of Paris on Monday.

Not long ago, he was fighting militants in foreign lands. But now, and for the foreseeable future, he has an assignment far closer to home: protect the hundreds of Jewish children, some as young as 2, who scampered about Monday behind walls whose Star of David etchings could make the building a prime target for attack.

“I’m glad the soldiers are here. But the fact they’re here means something is very wrong,” said the school’s director, Elisabeth Atthar. “It shouldn’t be this way.”

Yet for France, and especially for the country’s half-million Jews, this was the cruel reality wrought by last week’s terrorist attacks, one of which left four people dead at a kosher grocery store.

After reveling Sunday in the unity of millions marching in the streets against terrorism, the nation awoke Monday to the sight of 10,000 troops fanning out to guard “sensitive sites,” including synagogues, railway stations, airports and tourist attractions. Nearly half the soldiers — about 4,700 — will be assigned to protect France’s 717 Jewish schools, officials said. Some mosques will also receive government protection, following more than a dozen attacks on Islamic buildings since Wednesday.

The extraordinary measures marked the first time such a large military force in France has been used in civilian protection, and it produced the latest images of troops on Western streets — scenes reminiscent of the aftermath of 9/11 in the United States and later attacks in London and Madrid.

“It’s an indication of the level of menace we face,” said Col. Benoit Brulen, who stood guard with three rifle-toting soldiers at the Jewish school and synagogue in the city’s 11th arrondissement — not far from the offices of a satirical newspaper where the bloodshed began last week.

The troops’ presence, Brulen said, would continue “as long as the threat exists.”

The deployment foreshadows what are likely to be contentious debates here over how much France is willing to sacrifice its freedom, civil liberties and famously laissez-faire way of life to preserve security.

Officials across Europe have acknowledged they are overwhelmed by a rapidly metastasizing threat from militant Islamists and say the continent remains vulnerable to further attacks like the ones last week.

“There are going to be some very serious discussions about how to deal with this threat, and unfortunately that equates with some kind of militarization,” said Myriam Benraad, a terrorism researcher at the Paris-based Sciences Po university.

Already on Monday, French officials were hinting at the changes to come. French Prime Minister Manuel Valls told television network BFM that the government would push for legislation to expand intelligence agencies’ access to wiretaps, a move similar to one being pursued in other European capitals, including London.

Two hostage situations related to Wednesday's massacre at the satirical newspaper Charlie Hebdo ended Friday evening Paris time when police simultaneously stormed both sites. All three suspects were killed.

Analysts said there would also probably be pressure to add to the budgets of security services, which say they lack the manpower necessary to keep up as the number of people drawn to extremist ideologies proliferates.

“It’s impossible to do close surveillance of thousands of people,” said Jean-Louis Bruguière, a former counterterrorism investigator. “You’d need thousands more police and thousands more intelligence officers.”

Valls said officials across Europe are also considering tighter border controls, a measure that could help intelligence services track the rapidly rising number of Europeans coming and going from the war in Syria.

One possible accomplice in last week’s attacks apparently traveled there last week, just as the attacks were underway. Hayat Boumeddiene, a woman linked to one of the perpetrators, arrived in Turkey on Jan. 2 from Madrid and crossed into Syria from Turkey on Thursday, Turkey’s foreign minister, Mevlut Cavusoglu, told the state-run Anadolu Agency.

Seventeen people were killed over three days of bloodshed that included a mass shooting at the satirical newspaper Charlie Hebdo, the slaying of a policewoman and an armed hostage-taking at a kosher market. All three attackers died Friday in nearly simultaneous raids by security forces.

The wave of violence stunned France but brought stirring displays of unity and resolve that culminated with at least 1.5 million people gathered at a march in Paris on Sunday.

Perhaps no community has been more affected by the violence than France’s Jewish population, which is one of the largest in Europe. France also has the largest Muslim population in Western Europe, at 5 million.

The major security buildup around Jewish sites comes after Israeli leaders urged European Jews — and, in particular, those in France — to move to Israel in the face of growing anti-Semitism.

“I wish to tell to all French and European Jews — Israel is your home,” Prime Minister Benjamin Netanyahu said Sunday.

Last year, nearly 7,000 Jews immigrated to Israel from France. Natan Sharansky, chairman of the Jewish Agency for Israel, a quasi-governmental body that facilitates Jewish immigration and absorption, predicted that more than 10,000 French Jews would come to Israel this year.

Yonathan Arfi, vice president of CRIF, an umbrella group of Jewish institutions in France, said that even before last week’s attacks, French Jews were feeling under siege. In 2012, seven people were killed — including three children at a Jewish day school in Toulouse — by a French citizen of Algerian descent.

More recently, acts of anti-Semitism in France have soared, jumping to 427 incidents in the first half of 2014 — a 91 percent increase over the same period in 2013. Consider just the past three weeks: On Jan. 1, a fire was started in a building next to a synagogue in a suburb of Paris, along with graffiti of a swastika and the word “anti-Jewish.” On Christmas Day, bullets were fired at a kosher restaurant while it was closed. Three days earlier, projectiles were fired into the office of a Paris rabbi.

Jewish leaders blame three primary factors. First and foremost, they cite the spread of radical Islamist ideology among young Muslims, many of them underprivileged, in the Paris suburbs. But they also cite the rising political clout of the far right, as well as an increasingly toxic pop-culture scene personified by the anti-Semitic rhetoric of Dieudonné, a controversial Afro-French comedian who regularly lampoons the Holocaust and Jews.

Underscoring what French Jews call a poisonous atmosphere here, Dieudonné on Sunday appeared to suggest sympathy on his Facebook page for Amedy Coulibaly, the 32-year-old who took hostages and killed four people at a kosher grocery in east Paris on Friday. He made a pun on the slogan “I am Charlie,” a reference of solidarity with Charlie Hebdo, by saying “I am Charlie Coulibaly.”

“We live in the context of a French society where anti-Semitism is growing,” Arfi said. “We know that the biggest threat is jihadism, an ideology that puts attacking Jews at its core. And we have seen that ideology spread in the French suburbs, among young people of Arab and Muslim descent.”

Nonetheless, Arfi said he believes French Jews should stay.

“We have had a Jewish community living here for more than a thousand years,” he said. “We went through bombing attacks, the [Holocaust], acts of terrorism, and we are not about to leave now. We just want to be safe.”

Yet many are coming to the conclusion that’s no longer possible. David, a Paris hotel manager, said he kept his three children home from their Jewish school Friday, and his family is considering a move to Israel as he loses hope for Jews in France.

“This is the beginning of the end for us,” said David, who insisted that his last name not be published, because he worried about attracting unwanted attention.

As he spoke, his wife called with an urgent question that reflected the depth of their apprehension.

“She wanted to go to the store to buy eggs,” David said, “and wondered if it was safe to go out.”

Karla Adam in London, Brian Murphy in Washington and Virgile Demoustier and Cléophée Demoustier in Paris contributed to this report.

Correction: An earlier version of this article overstated the number of Jews who immigrated to Israel from France in 2014 and the number estimated to make the move this year. This version has been corrected.