Barack Obama and Bernie Sanders are political twins. They entered the 2008 and 2016 primaries as unknown outsiders with limited resources and weak ties to party leaders. Obama was a first-term African-American senator, while Sanders was a 74-year-old Jewish senator with a Brooklyn accent. Paradoxically, their status as political outsiders turned into an advantage.

Obama defeated Hillary Clinton with soaring rhetoric, a quintessentially American life story, varied experience as president of the Harvard Law Review and community organizer, and a modern social-media campaign. Obama was a unique politician who initially rejected donations from special interests. He built the “Obama Coalition” with black, Latino, college-educated and young voters.

Sanders was an unorthodox anti-politician who funded his campaign with small donations. He caucused with Senate Democrats, but remained a Socialist. He railed against Washington and promised to reform the system. Sanders ran a social-media-friendly campaign and built a coalition of millennials, working-class and college-educated voters.

Obama’s message of “Hope and Change” inspired a nation caught in the throes of recession and war. Sanders’ message of inequality addressed the fears of millennials and struggling families. Sanders was another version of Obama. This observation leads to a question: Could Sanders have defeated Donald Trump?

National mood: Americans were unsettled in 2016. They had lost faith in traditional leaders and were open to electing someone different. Political (especially Congress) and economic (especially Wall Street) leaders were considered out of touch. Sanders addressed this mood in ways that Clinton could not.

Aspirational vs. transactional leadership: Sanders and Obama pursued aspirational rather than transactional politics.

Aspirational politics focus on goals that are great and larger than the individual.

Transactional politics involve horse-trading between politicians and supplicants. Sanders’ genius was his ability to get voters to think in terms of the commonweal. Voters perceived Clinton as transactional. Sanders spoke to voters’ aspirations, while Clinton’s scripted message to identity groups was couched in transactional terms.

Voting: Sanders outperformed Clinton in the three Democratic states — Michigan, Wisconsin and Pennsylvania — that put Trump over the top. Political scientist Brian Schaffner analyzed data from a survey of 64,600 Americans conducted by the Cooperative Congressional Election Survey in fall 2016. Schaffner estimates that 12 percent of Sanders voters switched to vote for Trump.

Political scientist G. Elliot Morris found that 51,000 Sanders supporters voted for Trump in Wisconsin, 47,000 Sanders voters supported Trump in Michigan and 114,000 Sanders voters supported Trump in Pennsylvania. Trump won by 22,000 votes in Wisconsin, 10,000 votes in Michigan and 44,000 votes in Pennsylvania. Clinton lost the election because she was unable to hold onto Sanders voters.

Democratic National Committee: Leaked DNC emails show party officials discussing ways to rig rules to favor Clinton. This bias led Sanders supporters to sue the DNC. Federal Judge William Zloch found that the DNC and party chair Debbie Wassermann Schultz “held a palpable bias in favor of Clinton and sought to propel her ahead of her Democratic opponent.” Clinton also enjoyed an overwhelming and unfair advantage with super delegates.

Barack Obama and Bernie Sanders were the strongest Democratic candidates in 2008 and 2016, respectively. While we have no way of knowing if Sanders would have defeated Trump, spring 2017 polling data show Sanders with the highest favorability rating (+22 Harris-Harvard; +24 CNN) of all politicians.

How different the world would be if Bernie Sanders were president.

Edward Thompson III, a graduate of the University of Arizona and Howard University, is a retired executive vice president, provost and professor of political science.