LOD, Israel — As bands of Jewish and Arab citizens fought one another and police in towns across Israel for a third night early Thursday, Israelis worried that the battle inside the country may be harder to stop than the air war being waged with Gaza.

Chaos erupted in Israeli cities with mixed Jewish-Arab populations on Wednesday night, marking an escalation in the country’s worst communal violence in two decades. The Israeli media and local residents alike have warned about the threat of civil war in the country, even as Israel and Hamas have been engaged in the most intense exchange of rockets and bombs since the 2014 Gaza war.

As fighting between Hamas and Israel rages, Israeli media reported that an Arab driver near Tel Aviv was dragged out of his car and beaten severely on May 12. (Reuters)

In some cases, Arab Israelis protesting in support of Palestinians in Gaza and Jerusalem have squared off against right-wing Jewish Israelis and police, and these confrontations have sparked riots and looting. In other cases, groups of vigilante Jews have marched through Arab areas, targeting shops and individuals with violence. And in yet other cases, Arabs have attacked Jews passing through Arab neighborhoods.

Video filmed in the central Israeli town of Bat Yam showed Jewish nationalists pulling a man, whom they believed to be Arab, from a car and brutally beating him on the street. The Israeli media described the incident as “an attempted lynching in prime time.” The man was admitted to a Tel Aviv hospital with serious injuries, according to the Associated Press.

In the coastal city of Acre, Arabs critically injured a Jewish man with rocks and iron bars, and then the crowd attacked the ambulance taking him to the hospital, the AP reported.

Israeli Prime Minister Benjamin Netanyahu on Thursday said his government would begin using administrative detention — imprisonment without formal charge — against those involved in civil unrest. Human rights groups have criticized Israel’s broad use of it against Palestinians in the occupied West Bank.

The triggers for this unrest have been the armed conflict between the Israeli military and Hamas militants in Gaza and the preceding weeks of Palestinian protests in Jerusalem.

Since Monday, at least 83 Palestinians, including 17 children, have been killed in the Gaza Strip, Palestinian health officials said. Seven residents of Israel, including a teenager and a young boy, also have been killed, the Israeli Army said Thursday morning.

But Arab citizens of Israel also blame the unrest on police for essentially yielding their towns to right-wing Israeli mobs. Israeli nationalists say they are mobilizing because their Jewish communities feel unsafe. Both sides accuse the police of not protecting them.

Israeli Public Security Minister Amir Ohana defended those “law-abiding citizens” who carry weapons to assist the police. Arab Israelis said this amounted to an incitement of violence against them.

Busloads and carloads of nationalist Jews have descended on Lod, a city in central Israel with a mixed population, Israeli media reported. Many of them are young settlers from the occupied West Bank who have coordinated over WhatsApp. On Wednesday, they marched through Arab areas of the city, waving Israeli flags and some armed with guns, in defiance of a state of emergency declared earlier by the Israeli government.

“We are in such a state of anarchy,” said Nati Ron, who said he came to Lod on Wednesday night to defend its Jewish residents “from a pogrom” because he said the police would not.

As the night progressed, police were largely out of sight. Arab residents set up their own street defenses, also defying the 8 p.m. curfew.

Drivers and passengers entering those neighborhoods shouted, “Arab, Arab” to confirm they belonged, and some of the residents inspected the cars to make sure they were not transporting undercover Israeli police. Bands of Arab children and teenagers donned black disposable face masks to shield themselves from police surveillance, they said.

For decades, Lod has been a working-class city of Jews and Arabs. In recent years, religious nationalist Jews have moved into the city next to Arab areas.

In Haifa, a city often considered Israel’s model for coexistence, social media messages warned Arab residents not to go outside or to answer their doors, following reports that Jewish nationalists were keeping tabs on which homes were Arab-owned.

Reports of looting, arson and vigilante mobs elsewhere, in cities such as Tamra, Tiberias and Ramle, were shared through WhatsApp groups and social media posts.

Israeli police spokesman Micky Rosenfeld said more than 400 people were arrested Wednesday for assaulting police officers and being involved in “major incidents” in the cities of Acre, Kassem, Kfar, Lod, Ramle and Tamra, and around Rahat in the Negev desert.

He said several shootings occurred in Lod, where two Jewish civilians and one policeman were shot, the latter moderately injured. On Thursday morning, an Israeli man was stabbed in the city, Rosenfeld said.

Israeli Defense Minister Benny Gantz on Wednesday called up more reserves of the border police, who typically patrol in the West Bank and East Jerusalem. Border police had already been deployed in Lod, after an Arab man was killed in communal violence that erupted there earlier in the week.

“We are seeing the fracturing of our social compact,” Israeli commentator Nadav Eyal wrote on the front page of the Yedioth Ahronoth newspaper. “The cowardice of the Arab public leaders who whipped up a frenzy and then fled. The cowardice of the cabinet ministers who saw the development of La Familia’s racist gangs occur right in front of them, but after the turn of events in Lod yesterday, were afraid to say anything,” he said referring to a notorious group of right-wing Israeli soccer hooligans.

Netanyahu condemned the night’s violence, calling it “intolerable.”

“It doesn’t matter to me that your blood is boiling,” he said in a video statement. “You can’t take the law into your own hands.”

But Netanyahu’s critics say that by aligning with far-right nationalist parties, he has personally stoked the unrest.

“Netanyahu is burning all of us, Arab and Jews, only to stay as prime minister,” said Maisam Jaljuli, a political activist from Tira, an Arab city in central Israel. “This government is working for a long, long time to separate the two communities from each other,” she added.

Jaljuli said she was deeply afraid watching violence tear apart the idea of a “shared society” in the country.

“It seems like everything we worked for is collapsing right now,” she said. “People have no tolerance for each other. Everyone wants revenge from the other side.”