This week, both America’s inauguration and Israel’s election demonstrated democracy’s vitality. Both special moments offered valuable lessons about the rational and mystical elements of this extraordinary form of government, based on liberty, mutual respect and consent of the governed.

The inauguration was a legitimizing ceremony and a healing moment, inviting Americans to cheer their system’s stability, their government’s continuity, and the opportunity every fresh start represents -- even second terms. The U.S. president is both king and prime minister, head of state and head of government. Those kingly aspects have a magical, otherworldly dimension. The pageantry, the oath, the red, white and blue bunting, the inaugural balls, and, these days, the requisite dash of celebrity with Beyoncé lip-synching the Star Spangled Banner as Bill Clinton beamed in the background, reinforced the president’s place in America’s pantheon, linked to his legendary predecessors. The range of politicians on the podium, followed by the bipartisan Capitol Hill lunch -- rather than a Tea Party -- emphasized the celebration’s non-partisan patriotic character, as even disappointed Mitt Romney Republicans hailed their president.

The inaugural address was both state paper and partisan spur. Barack Obama quoted from the Declaration of Independence and forged a new holy trinity of milestones in the fight for equality by celebrating the women’s movement, civil rights movement and gay liberation movement with his “Seneca Falls and Selma and Stonewall” phrasing. He then elbowed his Republican rivals, snapping: “We cannot mistake absolutism for principle, or substitute spectacle for politics, or treat name-calling as reasoned debate.”

Israel’s election harked back to Americans’ drama during their presidential contest. In our world, with so many dictators and terrorists undermining liberty and disrespecting the people’s right to rule, every smooth, peaceful, democratic Election Day is a miracle to applaud, especially when it occurs in the Middle East. This time, many particularly enjoyed watching leading politicians, sophisticated pollsters and know-it-all pundits confounded.

Love him or hate him, fans of populism had to appreciate how Prime Minister Benjamin Netanyahu’s political miscalculations reinforced the people’s power. Netanyahu erred by uniting his Likud Party with Avigdor Lieberman’s Yisrael Beteinu Party -- Lieberman’s thuggery offended moralists while being dropped too low on the list demoralized Likud activists. Similarly, it was fun watching pollsters stumble, demonstrating that not everything is so predictable in our overly monitored, statistic-driven world. Most polls predicted 11 to 12 seats for Yair Lapid’s centrist Yesh Atid -- There Is a Future -- Party. The surge that gave him 50 percent more seats reflected the non-ultra-Orthodox Israeli middle class’s frustration with being over-taxed, over-worked and under-inspired as well as Election Day’s alchemy: moods shift, turnouts count, campaigns matter, democracy works.

Moreover, partisan commentators’ simplistic laments in Israel and abroad about “Bibi’s Israel” being anti-democratic, theocratic and hopelessly right-wing were wrong before Election Day, but more demonstrably false afterward, when the country’s polarization, liberal vitality and democratic volatility could no longer be overlooked, no matter how deep one’s prejudice toward Netanyahu or Israel. And Netanyahu will have to listen to the real Israel, middle Israel. The electoral math will allow him to form a right-wing-religious coalition -- but the people’s will demands a broader, more centrist government.

Neither America’s inauguration nor Israel’s election could obscure the deep divisions in both countries, their persistent problems, and one common challenge facing U.S. and Israel, that even polite Canada is starting to share -- today’s toxic partisanship. As a historian, I know that partisanship and mudslinging have old pedigrees. But democratic toxicity ebbs and flows. Moments of deep, dysfunctional division alternate with moments of majestic unity. In addition to whatever issues fragment individuals in the three countries, the modern media’s 24/7 news hysteria, the emerging blogosphere’s anything-goes nastiness, and our individuated, often selfish, advanced capitalist societies are giving politics today a particularly sharp, uncooperative edge.

It is easy, when examining these three allies, to criticize constantly, despair deeply and discount the inauguration’s magic, Election Day’s power, and the daily miracles that make the United States, Israel, and Canada members of today’s embattled minority of smooth, safe, functioning democracies. As we learn from each other to appreciate the good and try limiting the bad, we should remember the words of the great American diplomat, then Senator, Daniel Patrick Moynihan, who, when seeing the Soviet Communists and the Third World dictators gang up on America, Israel and other democracies in the 1970s, often cheered on by authoritarian leftists in the West itself, defiantly, inspiringly said: “It is past time we ceased to apologize for an imperfect democracy. Find its equal.”

Gil Troy is a history professor at McGill University and the author, most recently, of Moynihan’s Moment: America’s Fight Against Zionism as Racism. This was adapted from an op-ed in the Montreal Gazette.