JERUSALEM — Israeli lawmakers voted Monday to dissolve the parliament and hold elections on March 17, making the current government one of the shortest-lived in the country’s history. With no objections, lawmakers passed the motion at the end of an hourslong discussion of last-minute legislation that included no-confidence motions and harsh criticism of Prime Minister Benjamin Netanyahu’s government.

Lawmaker Dov Khenin called the Netanyahu government “bad and dangerous” and said it had blocked all chances for a political solution to Israel’s conflict with the Palestinians and the wider Arab world. Jamal Zahalka accused Netanyahu and his ministers of giving orders that killed thousands of Palestinians in the Gaza Strip, and called for a no-confidence vote that would be a “harsh indictment against a criminal government.”

The last law passed by the Knesset before it voted to disband was a bill allowing the jailing of African migrants entering Israel illegally. This was the government’s third bid to pass the controversial law, after the Supreme Court ruled that two previous bills approved by parliament were unconstitutional violations of rights, and threw them out.

In a statement after the vote, the community of African asylum seekers and refugees expressed “deep sorrow” over the bill. “A majority of lawmakers … would rather hide us in a desert jail than look reality in the eye. We are asylum seekers, not criminals,” they said.