Here's an idea for beleaguered Democrats looking for a way out of their postelection wilderness: Look back to a Democratic icon of half a century ago who was on the cusp of uniting precisely those angry working-class whites who rallied to Donald Trump with Hillary Clinton's coalition of minorities and liberals.

The Robert F. Kennedy who ran for president in 1968 was a racial healer, a tribune for the dispossessed, and an uncommon optimist in an age of political distrust.

"Each time a man stands up for an ideal," Bobby reminded us, "he sends forth a tiny ripple of hope, and crossing each other from a million different centers of energy and daring, those ripples build a current which can sweep down the mightiest walls of oppression and resistance."

No wonder audiences swooned. And his words seem even more resonant in this looming Era of Trump.

The first key to Bobby's broad appeal was that our favorite liberal began life on the other side of the ideological chasm. He was nurtured on the rightist orthodoxies of his dynasty-building father and he kick-started his public career as counsel to the left-baiting Sen. Joseph McCarthy. That younger RFK was a bare-knuckled political operative who masterminded his brother's whatever-it-takes bids for senator and president. As attorney general, Kennedy approved FBI wiretaps of Martin Luther King Jr., whom he never trusted or liked. Even guerrilla warfare was in his tool kit: Bobby masterminded cloak-and-dagger operations against Communist Cuba that included plotting the elimination of Fidel Castro. His steely conservatism made him an idol to a young Rudolph Giuliani and younger Bill O'Reilly and Karl Rove. It also ensured that blue-collar whites stuck with him even as he moved leftward.

The upshot: In his first contested presidential primary, in Indiana, Bobby won the seven largest counties where the racial-backlash candidate George Wallace had done best in 1964 (at the same time he scored a crushing 85 percent of the votes in African American districts). He did better still in Nebraska, which had even fewer blacks and more farmers. All of which is why Richard Nixon was so nervous about facing off against another Kennedy in November, and why contemporary Democrats should worry less about ideological purity and more about finding someone with Bobby's populist passion.

Lesson two for today's hyperpartisan politics is the way Sen. Bobby Kennedy fashioned bold bipartisan solutions to nagging problems like rebuilding the Brooklyn neighborhood of Bedford-Stuyvesant, America's biggest ghetto. Washington would pay for training unemployed adults, constructing a cultural complex, and other classic liberal initiatives. Tax breaks would lure big business to build industrial plants and shopping centers, an idea that drew raves from the conservative standard-bearer William F. Buckley Jr. And borrowing an approach from the New Left protest movement, local residents would exercise unprecedented self-governance. "We are striking out in new directions," the New York senator said, "perhaps without map or compass to guide us." Half Che Guevara, half Niccolò Machiavelli, Bobby was a shaker-upper dedicated to the art of the possible.

It doesn't take much imagination to know where Bobby would have stood on Trump. As a Harvard undergraduate, Kennedy took on the anti-Semitic demagogue Father Leonard Feeney. As attorney general, he stood down Gov. Wallace, who vowed to block the schoolhouse door to black students seeking admission to the University of Alabama. The only figure who ranked ahead of Jimmy Hoffa and J. Edgar Hoover on Bobby's most-hated list was Roy Cohn, the young McCarthy protégé who, as an old man, served as a political mentor to the young Donald Trump.

The truest key to Bobby's political success was his authenticity. Over the course of his 82-day campaign for president, Bobby defied people's prototypes of pandering politicians. He knew how issues like crime could be used as a wedge between blacks and whites, poor and rich. So he made sure that every speech on crime included a call for justice, and that what he said to chambers of commerce differed in the sequence but not the elements from what he said in the slums. He told college kids everywhere he went that they could change the world, so why weren't they?

It happened again at a luncheon of Civitans, a men's service club. As his audience chewed on Salisbury steaks, he took the requisite questions on gun control and daylight saving time. Then he turned to his biggest issue - "American children, starving in America" - and asked, "Do you know, there are more rats than people in New York City?" Hearing guffaws, this senator who was kept up nights by images of the hungry children he'd met in the Mississippi Delta grew grim: "Don't . . . laugh." Thomas Congdon Jr., an editor at the Saturday Evening Post, was struck by what he witnessed: "He was telling them precisely the opposite of what they wanted to hear." It was demagoguery in reverse.

What Bobby accomplished in 1968 could be a beacon for 2016, if the progressive opposition is listening. America was as riven then as it is today, and as tempted by divisive demagogues. The Cold War and New Deal seemed archaic to the generation of the Thaw and the New Left. Race riots were igniting the cities and overseas tensions were widening the split between parents and children. There was no national consensus anymore - but there were few figures in American politics more able and determined to build bridges between the alienated and the mainstream than Bobby, who had lived on both sides. He'd laid claim to a rare piece of political ground as a pragmatic idealist, which was the same terrain JFK had hoped to plow. While some remained skeptical, others were dazzled by the possibilities of a standard-bearer with that blend of tenaciousness and gentleness.

"One of the reasons, I suspect, that some people are puzzled by Senator Kennedy is that he is a tough-minded man with a tender heart," said Sen. George McGovern, who stood with Bobby against both hunger in America and U.S. involvement in Vietnam. "He is, to borrow Dr. King's fitting description of the good life, 'a creative synthesis of opposites.' "

Larry Tye is the author of "Bobby Kennedy: The Making of a Liberal Icon."