Israel's parliament has passed a new law that would prevent a prime minister from being declared unfit to hold office by the attorney general.
It is considered to be in the interests of the incumbent, Benjamin Netanyahu, who is on trial on corruption charges.
The law is the part of his right-wing government's contentious plan to limit the powers of the judiciary, which has led to months of protests.
Hours after the vote opponents began what they called a "day of paralysis".
Tens of thousands of demonstrators gathered in Tel Aviv and other cities, and blocked major roads. A large Israeli flag and a banner with the declaration of independence were also draped over a wall in the Old City of Jerusalem.
Police used water cannon and mounted officers to disperse a crowd on a busy Tel Aviv highway and said they had arrested dozens of people across the country for public disturbance.
In the evening, protesters began marching towards the ultra-Orthodox Tel Aviv suburb of Bnei Brak, where there is widespread support for the government.
Ahead of the event, protesters set up chairs and tables, surrounded by Israeli flags, and invited members of the community to meet them for reconciliation talks about the planned law changes. There were heated conversations.
Photos emerged on social media of one of the protest leaders, a doctor, lying bloodied on the ground after being hit by a car. But the organisers later said that it had been an accident, not a deliberate act.
The new Incapacitation Law, which passed by 61 votes to 47 in the 120-seat Knesset following a heated all-night debate, makes it far harder to remove a sitting prime minister against their will.
It stipulates that only the prime minister or three-quarters of their cabinet can declare them unfit to hold office on physical or psychological grounds.
The governing coalition introduced the legislation last month after Attorney General Gali Baharav-Miara said Mr Netanyahu could not be involved in its judicial overhaul due to the potential conflict of interest arising from his ongoing court cases.
He is standing trial on charges of bribery, fraud and breach of trust in three cases. He denies any wrongdoing and says he is the victim of a "witch hunt".
The new law would effectively prevent Ms Baharav-Miara from declaring Mr Netanyahu unfit to hold office if she believes that he is attempting to halt his trials.
Ofir Katz, a member of Mr Netanyahu's Likud party, argued the legislation would bring "stability" by making it harder to remove a prime minister against their will.
But opposition leader and former prime minister Yair Lapid tweeted: "Like thieves in the night, the coalition has now passed an obscene and corrupt personal law."
National Unity Party leader and former defence minister Benny Gantz tweeted that it was "all about strengthening Netanyahu's rule" and urged people to take part in Thursday's demonstrations.
The protests have continued to grow since Mr Netanyahu returned to power at the end of last year, leading the most right-wing, nationalist coalition in Israel's history and promising to curb the powers of the judiciary.
The changes would give the government full control over the committee which appoints judges and would ultimately strip the Supreme Court of crucial powers to strike down legislation.
Mr Netanyahu says the reforms are designed to stop the courts over-reaching their powers and that they were voted for by the public at the last election.
Most legal scholars say they would effectively destroy the independence of the judiciary, while opponents describe them as an attempted "regime coup".
Earlier this week, the coalition announced it would delay part of the judicial overhaul until after the Knesset's break for the Jewish Passover holiday.
But, crucially, the coalition also said it would attempt to push through key changes to the judicial appointments committee before the recess starts on 2 April, albeit with some modifications it sees as a gesture to soften the reforms.
The opposition immediately rejected the move, while protest leaders said the announcement was not a compromise but a declaration of war against Israeli democracy and its citizens.
https://www.bbc.com/news/world-middle-east-65049937