With an economy seemingly on the precipice of a renewed recession, an angry conservative movement that regards him with disdain, and a disillusioned liberal base disappointed in his first term, Barack Obama’s bid for reelection next year will, by all indications, be a tough, maybe even uphill fight. But daunting as the campaign may seem, the president can at least take some solace in a precedent from 64 years ago: Harry Truman’s campaign for reelection in 1948—successful, despite a poor economic climate, and a polarized electorate—offers a promising path for Obama’s reelection. The question is whether he’s prepared to take it.

In terms of the difficulties they faced, these two Democratic presidencies have plenty of parallels. Most prominently, both were hampered by crippling midterm elections, fueled largely by anger about the poor state of the economy, which produced sweeping and across-the-board loss of seats for their party in Congress. In 2010, Democrats lost 63 seats in the House and 6 in the Senate, losing the House after four years in the majority and losing most of their comfortable cushion in the Senate. In 1946, Democrats lost 55 seats in the House—where Republicans grabbed a comfortable majority for the first time in sixteen years—and 13 seats in the Senate, giving Republicans there a 51-45 edge, their first majority in fourteen years.

The 80th Congress of 1947 and 1948 actually had some impressive achievements, acting with commendable bipartisanship on foreign affairs by enacting the Marshall Plan and a sweeping reorganization of the executive branch that included the establishment of the Defense Department and the National Security Council. But the Republicans’ record on domestic policy was something else entirely. As historian William Leuchtenburg put it, “they veered so sharply to the right that they alienated one segment of the electorate after another. They antagonized farmers by slashing funds for crop storage; irritated Westerners by cutting appropriations for reclamation projects; and, by failing to adopt civil rights legislation, squandered an opportunity to make further inroads among African-American voters.” At the same time, by pushing the anti-union Taft-Hartley legislation over Truman’s veto, they drove a labor movement furious with Truman back into the president’s arms.

In what will no doubt sound familiar to watchers of the current Congress, the sweeping GOP victories in 1946 convinced many Republicans that they had achieved a lasting ideological victory—that the American public had finished with the liberalism under FDR and Truman, and embraced their brand of conservatism. They were wrong. Voters had reacted to short-term economic conditions, and to a post-war mood for change, but not for a new right-wing ideology.