JERUSALEM (AP) — A court ordered the release of a former Air Force general and leading critic of Prime Minister Benjamin Netanyahu from jail on Sunday, a day after hundreds of people protested outside the Israeli leader's residence calling for him to be freed.

Retired Brig. Gen. Amir Haskel has been a leader of the protest movement against Netanyahu, demanding that the long-time leader step down while facing charges of fraud, breach of trust and accepting bribes. Haskel and several others were detained on Friday in what police said was an “illegal” demonstration because the protesters blocked roads.

The arrest of Haskel, a former top Israeli Air Force general, has turned him into a symbol of the protest movement that opposes Netanyahu's continued rule. Demonstrations have been held regularly around the country, with protesters waving signs reading “crime minister" and calling for Netanyahu to resign.

“A line was crossed that must not be crossed. The reason for my arrest was a desire to silence the protest against the person accused of a crime, Benjamin Netanyahu,” Haskel told a news conference Sunday evening. “In the moral state of Israel, there is no way a person accused of a crime should be prime minister.”

“If my arrest, and the arrest of two of my friends, lit the flame, the price was worth it,” he added.

The arrests drew angry denunciations from prominent Israelis and sent hundreds out to protest outside Netanyahu's residence on Saturday, with many slamming the police for making what they viewed as politically motivated arrests.

Police said they offered to release Haskel and others if they agreed to refrain from returning to the scene of the protests. Haskel and two others refused the conditions and remained in detention.

Gaby Lasky, Haskel's lawyer, told Israeli Army Radio that the court eventually released him without conditions, saying protesting was the foundation of democracy.

The country's acting police chief said the force would learn from the incident.

“The role of the police is to allow freedom of expression and demonstration to every person and to keep the public peace and security, this regardless of the protest's subject, the identity of the protesters or their opinions," acting commissioner Motti Cohen said.

Netanyahu is on trial for a series of scandals in which he allegedly received lavish gifts from billionaire friends and traded regulatory favors with media moguls for more favorable coverage of himself and his family. The trial is set to resume next month.

Netanyahu has denied wrongdoing, calling the charges a witch-hunt against him by a hostile media and a biased law enforcement system.

The scandals, and Netanyahu's indictment, featured prominently in three Israeli election campaigns over the course of a year. The political stalemate finally ended last month when Netanyahu reached a power-sharing agreement with his chief challenger, retired military chief Benny Gantz.

But tensions were still evident at Sunday's weekly Cabinet meeting when Gantz, the defense minister and alternate prime minister, noted Haskel's arrest and said the right to protest was a “sacred right.”

Netanyahu, seated alongside him, retorted that the right to protest was never in question and that Israel allowed it even amid the most restrictive of times during the recent coronavirus outbreak.

“The argument that we are looking to limit it is absurd,” he said. “ At the same time, the laws and regulations of the state of Israel must be maintained. It is not the prerogative of one side to say they support the rule of law and then to trample it."