JERUSALEM — After two days of settler violence that shocked much of Israel, Prime Minister Benjamin Netanyahu announced Wednesday that some radical Israelis would be treated the same way as suspected Palestinian militants — detained for long periods without charge and tried in military courts.

The disclosure of the new enforcement tools followed an urgent meeting of the country’s top legal and security officials and showed how worried Mr. Netanyahu and his lieutenants have become about militants of the far right who attack not only Palestinians in the West Bank, but also the Israeli Army there.

Around the world, it is the abuse of Palestinians under Israeli occupation that draws anger, the separate legal systems — one for Jewish settlers and another for Palestinians — that has produced comparisons to South Africa under apartheid. Here, it was a settler assault on an army base and on a military commander in occupied territory that enraged Israelis and produced an instant consensus that radical steps equaling those applied to Palestinians were warranted.

“Red lines were crossed,” blared Maariv, a centrist daily, across its front page on Wednesday. The previous night, Mr. Netanyahu made a speech in which he described the settler attack on the Israeli military base as “a game changer.”

Political leaders from across the spectrum competed to condemn the settlers’ violence, with the left and center accusing Mr. Netanyahu of ignoring previous settler violence and the right saying that out-of-control youths were besmirching an otherwise noble movement.

In his announcement of the authorization to use what is called “administrative detention” against radicals — imprisonment for long periods without charge — Mr. Netanyahu said: “Those who raise a hand against Israeli soldiers or Israel police personnel will be punished severely. Those who rioted at the Ephraim Brigade base are like those who riot in Bilin.”

Early Tuesday, dozens of settlers attacked the Ephraim Brigade base of the army, near Qalqiliya in the northwest of the West Bank, after they heard that settler outposts were to be dismantled. Mr. Netanyahu’s comparison was to a Palestinian village north of Jerusalem, which for six years held weekly demonstrations that occasionally turned violent against the Israeli security barrier’s encroachment on village land.

A spokesman for Mr. Netanyahu, Mark Regev, said by telephone that one of the most significant elements of the announced changes was the way they brought aspects of the legal systems for Israelis and Palestinians living in the West Bank into line.

“One of the criticisms of Israel is that there are two systems of law in the West Bank, one for Palestinians and a second for Israelis,” Mr. Regev said. “Now rioters from both will be tried under the same system.”

Human rights groups have long condemned Israel’s use of administrative detention against Palestinians and were not expected to applaud its use against settlers despite their objection to settlements.

Mr. Netanyahu declined to go so far as to formally label violent settlers “terrorists.” Doing so would have allowed security forces to use targeted sanctions and courts to impose harsher punishments.

And he made sure to underscore that he does not believe settlements are the problem, just the violent outliers. Using the biblical name for the West Bank, Mr. Netanyahu added, “It is important to me to emphasize that this is a small group that does not represent the public that lives in Judea and Samaria, who are loyal to the state and its laws and who condemn the rioting.”

With that, Mr. Netanyahu rejected the position, widely held outside of Israel and among some factions within, that the settlement enterprise is taking land away from a future Palestinian state.

Other steps announced include granting soldiers the power of arrest, currently held only by the police, increasing the number of security forces on the ground and increasing the number of settlers removed and banned from the West Bank.

On Wednesday, when the police drove to an apartment building in Jerusalem to question some of those who had been barred from the West Bank, they were met with dozens of rioters in the street, many of them local religious students, who slashed police car tires and smashed their windows.

Earlier in the day, a disused Jerusalem mosque was defaced and set afire. The words “price tag” were spray-painted on the mosque. “Price tag” refers to violent acts by settlers and their supporters against Palestinians and Israeli security forces.

Mr. Netanyahu’s critics sharply criticized him as playing down the extent of settler violence and seeming surprised by what had happened this week.

“There is no word more shameful in the Israeli lexicon of violence than the word ‘handful,’ ” wrote Nahum Barnea, a columnist for the Yediot Aharonot newspaper, referring to characterizations of the violent settlers as so small in number as to be insignificant. “This criminal behavior must be rooted out, and everyone knows where the roots are: in the incitement of the settler rabbis, in the Israeli governments that over and over again approved the settlers’ illegal acts, in the leniency of the judges and in the powerlessness of the Shin Bet, the army and the police.”

Uzi Landau, the national infrastructure minister and member of the nationalist Yisrael Beiteinu party that is part of the government, said, by contrast, what many of those who support the hundreds of thousands of Israeli settlers in the West Bank believe: that the violence perpetrated by a relatively small number was hurting the image and interests of them all and therefore needed to be handled harshly.

“These scoundrels have caused the settlements heavy damage,” Mr. Landau said on Israel Radio. “They help the enemies of settlement in Judea and Samaria and also help those who wish evil on the settlers.”