Elections in Halacha:
The mandate of power to elected officials:
The Torah, and Jewish law, recognizes the concept of elected officials and the power that they contain to make binding decisions upon their governed body. Officials elected over a city have ability to make Takanos, decrees, and laws that are legally and Halachically binding onto the members of that city, as they see necessary for the benefit of the city. The Torah also gives them a long arm of power to help counter crime, violence, and violations of Torah law, in ways that they see necessary, even if it does not abide by the Torah’s personal guidelines of punishment that were handed to Sanhedrin. The Halachic term used for the elected officials is the “Shiva Toveiy Hair,” which were the seven elected representatives to the city council.
How are the city leaders elected?
The officials who have the legal and Halachic mandate to rule and make order for the city residents must be elected by the city residents. The candidate who receives majority of votes from the residents of the city [who are eligible to cast votes], wins the position. [This is similar to the current democratic process of today, in which mayors and other city and government officials are elected through a majority vote of state and county residents. This democratic process of election is based on the Talmud and is recorded in the Rishonim.] Irregularities in the election process, such as voter fraud, voter bribery, and unfair intimidation of voters, rend the outcome Halachically invalid, as the outcome does not truly represent the will of the city residents.
Does the Rav of the city have a say regarding the elected officials? Although the Rabbinical leaders of the city are considered the Mara Diasra, and maintain certain powers over the city, they do not have the right to elect the leaders on behalf of the city, and the election must take place through the votes of the city residents, as explained above. Furthermore, even the Rav himself is to be elected by the majority of the city residents for him to take his position. Nevertheless, the Rav or city Beis Din does have the Halachic power to decide on invalidations in the election process, and of the candidates. Likewise, certain spiritual positions may be elected by the Rav, in accordance to the community custom. A Rav may also give guidelines to the city residents regarding the preferred types of candidates, and that they should represent Torah values. At the same time, the Rebbe advocated throughout the years the necessity for the people to make their decision on the vote and discouraged the intervention of Jewish leaders or Rabbanim from taking sides or aligning with a single party or candidate. In the Rebbes words “One should vote for the most Torah observant party/candidate” regardless of that parties or candidates’ person sectorial affiliation. It goes without saying that the Rebbe discouraged the giving of directives or “Psak Dinim” to vote for one specific candidate, advocating that Rabbinical clergy should remain apolitical.
 Rama C.M. 2:1 “So is the custom in all places that the Tuvei Hair of the city is like the Beis Din Hagadol”; See Michaber O.C. 153:7; Choshen Mishpat 2:1; Smeh 2:9 that the elected officials are elected to be like a Beis Din for the city; Rashba Meyuchasos 279-280 “Every congregation has permission to make decrees and institutions for their city, just as the Sanhedrin can do for the entire Jewish people”
 Rashba ibid
 See Rama ibid
 See Megillah 26a; Michaber 153:7 regarding selling shul; Admur 53:23 regarding chazan; Choshen Mishpat 2:1; Rashba 1:617; See M”B 153:29 that there must be seven elected officials for the body to have power to make decisions for the city
 Brachos 55a “One may not appoint a community leader without discussing the matter with the community [and receiving their subsequent approval of the candidate]. As did Moshe with Betzalel”; Rama C.M. 163:1 based on Maharam Merothenberg Sefer Kinyan 27 and Hagahos Maimanis Tefila 11:2 “All the needs of the public that cannot be decided unanimously are to be decided through a vote being cast Lisheim Shamayim, and they are to follow the majority”; Tur 2 “The seven Tuveiy Hair which the majority elected upon them”; Smeh 2:9 in explanation of Michaber 2:1 “The seven Tuvei Hair which the congregation elected to be like a Beis Din upon them”; Rosh Klal 6:5 “All matters relating to the community must follow majority opinion”; Rashba 1:617, brought in Rashdam 175 and M”B 153:29 “The Sheva Tovei Hair are not the wisest or richest, but those whom the community have appointed upon them.”; Rashba 7:490; Shut Mabit 1:84; Chasam Sofer C.M. 19 “How can anyone be appointed to any position without receiving the approval of the majority of the congregation”; Chasam Sofer C.M. 21 brings the wording of the Teshuvah of Maharam “We made a decree that no person be elected to any position unless majority of the congregation elects them. One who transgress this is in Cherem and his wine and bread is like that of a gentile…this letter was signed by the Rashbam, Rabbeinu Tam, Ravan and 150 Rabbanim”; Aruch Hashulchan 163:2 “If the city residents elected officials to represent them in the decisions making of the city, then we follow the majority opinion of the elected officials.” Koveitz Al Yad 4:157 “If the officials are elected by the congregation, as is accustomed then I would accept their words, if however, they bought the position with money and power…”; Tzitz Eliezer 3:29
 See previous footnote!
 Chasam Sofer regarding a Rav who was elected by the majority of voters, and it was discovered that some of the voters were payed off to vote for the Rav, the Chasam Sofer ruled that the elections are invalid even if the Rav would have won without the bribed voters. He also ruled that the voters who accepted the bribe may never be appointed for this or other positions.
 See Poskim in previous footnotes!
 Chasam Sofer ibid; See Sichas Matos Maaseiy 5746 “It has never been heard of amongst the Jewish people that a select few decide who will be the Rav of a community..or the community council. Let it be known, that whoever interferes with the elections, he is to be greatly pitied, and more than this I do not want to elaborate”
 Letter written 15th Teves 5714 “As is known, Lubavitch is very careful to avoid any political affiliation. This applies to Eretz Hakodesh as well as other countries. This was a directive from the Rebbe Rayatz which I upkeep.”; Sicha 6th MarCheshvon 5714; Meeting by dollars distribution on 6th Nissan 5750 with a reporter from Kol Yisrael “I do not mix into politics”; Tzadik Lamelch 6:19 “It goes without saying that you should not involve yourself in the local politics”;
 The one exception to this was in 1989 when the Rebbe directed the public to vote for the Agudas Yisrael party in Israel, due to extraordinary and mitigating circumstances. Immediately after the election, which was a great success for the Chassidim, the Rebbe directed for all Chabad institutions to return to the party line of non-political affiliation.