In the last decade, voters over 65 years old have become more Republican, even as the electorate as a whole has been trending in the opposite direction. In 2004, George W. Bush won that demographic by a margin of 8 percentage points, but won the national popular vote by just 2.5. Eight years later, Mitt Romney did even better with older voters. He beat Barack Obama by 12 percentage points among seniors, despite losing overall by nearly 4 percentage points.

It’s not simply that people get more conservative as they age, despite whatever Winston Churchill is alleged to have said. As late as 2000, there was little difference in presidential voting between the old and the young. In theory, the growing age gap in partisanship could be a reaction to President Obama’s policy agenda, with its focus on health care for those ineligible for Medicare — but we started to see the drift even before Obama. Likewise, it’s tempting to credit broader demographic changes, as younger voters are a more ethnically and racially diverse group. But that can’t be the whole story; the same trends are evident among non-Hispanic whites.

It turns out that today’s partisan shifts among older voters owe less to President Obama and more to President Dwight D. Eisenhower.

One of the seminal early studies of the American voter — aptly titled The American Voter, from 1960 — noticed a critical feature of the 1950s electorate: Attachment to the two parties wasn’t distributed evenly across age groups. Instead, those voters who had come of age around the time of the New Deal were staunchly more Democratic than their counterparts before or after. “[T]he impact of the Depression is unmistakable in the images of the parties that we find in the public mind long after that tragic decade had passed,” the authors wrote.

Even with the major changes in American politics since the New Deal — the end of the Solid South, the rise of television, the polarization of the political parties — the claim that political generations matter has stood up remarkably well. When voters enter the electorate, still in their adolescence, their attachment to the political parties isn’t especially developed. They are less likely to think of themselves as strong Democrats or Republicans, and also less likely to see the world through that prism. That means that the political conditions at the time are especially important to the youngest voters. If the president in power is presiding over good times, young voters swing toward that party. As with presidential approval, good times are usually defined in terms of bread and peace: How is the economy? And if a war is being fought, how is it going? If those yardsticks suggest times are bad, a president is likely to be perceived as unsuccessful and to cost his party support. But what’s more unexpected is that voters stay with the party they identify with at age 18, developing an attachment that is likely to persist — and to shape how they see politics down the road.

To see the echoes of politics past, I turned to the Institute for the Study of Citizens and Politics panel that researchers at the University of Pennsylvania and Georgetown University collected during the 2012 election. Specifically, I coded partisanship as ranging from 1 to 7, where 1 meant “strong Democrat” and 7 meant “strong Republican.” From there, I plotted the partisan loyalties of the respondents by the year in which they turned 18, averaging them over the two cohorts above and below. The figure below shows the results for just over 1,800 non-Hispanic white voters, although those for non-white voters are surprisingly similar. The dotted lines are the beginnings of each president’s administration.

The most Republican group is the one that came of age early in the Eisenhower presidency, with those turning 18 during the Reagan presidency coming in second. Voters who turned 18 during the final years of the Carter administration aren’t exactly big fans of the Democrats, either, whether due to the tough economic times or challenges abroad. By contrast, the most Democratic group is the one that came of age during George W. Bush’s presidency, especially its later years as perceptions of the Iraq War became more negative.

The legacies of presidents like John F. Kennedy, Lyndon B. Johnson, Bill Clinton and even Richard Nixon are more muted. In part, the political tumult of the 1960s may have thrown a wrench into the usual process of developing a partisan identity. At the time, what it meant to be a Democrat or a Republican was changing. The Democratic Party was no longer the dominant party of white Southerners, but blacks in the north and south were increasingly siding with the Democrats. And with the Democrats’ deep internal divisions over Vietnam, the party wasn’t the obvious choice for foreign-policy hawks, either.

Notice, too, that the oldest voters in the chart above were those who came of age while Harry Truman was president. Those same voters prove to be more Democratic than those born a few years later, even when asked in 2012. More than 60 years after Truman stepped down and Eisenhower took office, the legacy of that transfer is still shaping voter choice.

This research offers one key lesson for parties: Perform today, benefit tomorrow. (A quick glance at the age breakdowns for New York Mets’ and Yankees’ fans suggests that it’s not just a lesson for political parties.) But the decades-old legacy of political conditions also highlights the problems facing our two major parties: Democrats have no lock on younger voters, and Republicans are bound by their advantage among older ones.

FiveThirtyEight’s Harry Enten and the Monkey Cage’s John Sides have pointed out precisely this former point, noting that voters who have come of age during Obama’s presidency are less inclined toward the Democratic Party than their counterparts who are just a few years older. Young voters’ support helped make Obama president. But that in no way guarantees that his presidency will make them life-long Democrats.

The prominence of the Eisenhower generation in today’s GOP also points to a dilemma on that side of the aisle. In part because of events decades ago, the base of today’s GOP has an atypical share of older voters. That in turn has forced the party’s hand on policy. As Republicans have tried to cut federal spending, they’ve had to tip-toe around two of the largest items in the federal budget, Social Security and Medicare, because those programs enjoy robust support from older voters. Want to understand why the 2011 deal to make across-the-board budget cuts went so deeply into discretionary and military spending while leaving Social Security and Medicare untouched? Our particular demographic moment in politics — and the unexpected coalitions it has produced — is one good place to start.