One of the messages of Purim is that divine intervention is often disguised as merely having the right person in the right place at the right time.
The heroes Esther and Mordechai conveniently appear where and when it is necessary to save the Jewish people.
The villain Haman has what would appear to non-believers as mere bad luck in everything from who is chosen as queen to the random date selected for him to massacre the Jews.
It may or may not be due to divine intervention, but also in modern- day politics, success often depends on the timing and circumstances surrounding a race.
The inauspicious date chosen for the contentious Beit Shemesh election was the ninth of Adar Bet on the Jewish calendar, a day tradition holds that some 2,000 years ago, the two dominant Jewish schools of thought, Beit Hillel and Beit Shammai, erupted into a conflict that led to as many as 3,000 deaths.
During the tensest moments of the election, Beit Shemesh appeared to be on the verge of civil war between haredim (ultra-Orthodox) and its secular and national-religious Zionist majority.
Secular candidate Eli Cohen conceded honorably to victorious incumbent Moshe Abutbul in an effort to start the healing.
But many residents who threatened to leave the city if Abutbul won are actually angry enough to carry out their threat.
And efforts to divide the city in two will only intensify.
The haredim who maintained power over the city can thank God for their electoral achievement.
But they can also thank the Knesset for scheduling the debate on the haredi conscription bill for the same day as the election.
The anti-haredi atmosphere created by the legislation put the haredim on the defensive.
Their first opportunity to take revenge against the secular and religious- Zionist Israeli establishment that they believe have ganged up on them was Beit Shemesh.
The haredim came into the election a lot angrier and much hungrier for a win than the rest of the citizens of Beit Shemesh.
Shas leader Arye Deri especially could not afford to lose after a spate of political setbacks.
Extreme anti-Zionist rabbis ordered their adherents to turn out to vote in the election, despite never taking any steps before to recognize the validity of the state.
That was enough to win an election by a small margin in a bitterly divided city.
It could be that had the election been held at a different time, the results would have been different.
But in a city whose name means house of the sun, the timing was key in deciding for which candidate the sun would shine.