Democracy, some will say, is preserved by the Supreme Court. Others will say it is a free press that protects it.
For 50 years the Supreme Court never considered cancelling a law passed by the Knesset, but at the same time in all those years the Knesset never considered passing a law that would allow the ruling party to skip an election and extend its tenure (except during the 1973 Yom Kippur War).
Democracy was preserved thanks to the strong belief among the political, military, economic and cultural leadership that it was the only desired form of government and must be protected at all costs.
This belief stems from culture, education and the example set by those in power.
Leaders made sure that the Knesset would not legislate laws to undermine democratic elections. They also made sure there could be no undemocratic power grab by the military or the police.
The belief in the importance of democracy can only exist if it is based on written and unwritten principles.
One principle is the self-imposed restraint by the branches of government in their use of power. The Supreme Court has not always given the best example of that.
Another central principle is the axiom that in democratic elections, power sometimes changes hands and governments must accept loss of power, no matter how painful they may find it to be.
Leadership must be prepared to face the voters even if they fear the result will be a transfer of power to their opposition.
This principle and its subsections make clear that not everything is permitted in a bid to hold on to power and rules of democracy must not be changed to ensure the victory of one party or even to improve that party's chances of winning.
For a while now, unfortunately, we have been witnessing an erosion - if not worse - of these basic principles on which democracy depends.
Prime Minister Benjamin Netanyahu seems to conflate his possible personal failure in the elections with a national calamity, thereby allowing him a free hand to take anti-democratic steps such as announcing needless elections in order to prevent others from forming a government. While this is within the confines of the law, it is definitely a blow to democratic principles.
The fact that the prime minister could muster a Knesset majority for such a move is even more worrying.
Then his ruling Likud Party came up with another idea - that the party, perhaps other parties as well, would be allowed to place cameras in polling stations, despite the strong objections of the chairman of the Central Elections Committee, Justice Hanan Melcer and Attorney General Avichai Mandelblit, and - ultimately - the Knesset.
Using cameras in polling stations in order to preserve the integrity of the vote was not a bad idea on the face of it, but Netanyahu had 10 years in power in which to legislate for cameras on Election Day, In any event, it cannot be political parties tasked with protecting the elections. That is the job of the Central Elections Committee.
Tryiung to push through legislation in the last week leading up to the ballot was a further erosion of democratic principles.
The prime minister is right to complain that leaks from the investigations into his suspected corruption are harmful to him, but his attack on journalists and even owners of media outlets are unjustified.
Former prime minister Ehud Olmert, who was jailed for corruption, fared much worse than Netanyahu. But throughout Olmert's experience, there was no criticism from Netanyahu of the media, police or prosecution for providing leaks.
The biggest threat to democracy looming over these elections is the proposed annexation of parts of the West Bank while Palestinians residing there would at best be given permanent residency and not full citizenship.
This would no longer constitute an erosion of democratic principles, it would fundamentally undermine them.