After Tuesday’s election results, Democrats lost the White House and remained a minority in Congress and in state legislative chambers. Their appointees to the Supreme Court are likely to remain in the minority for years to come. But history suggests that parties this deep in the political wilderness don’t remain there for long.

The last time a party was in this situation, it was the Republicans in 2008, and they won back control of the House two years later and never let go. Before that, Democrats held control of the White House and Congress in 1978, but lost the presidency and the Senate to Republicans in 1980. In both cases, the majorities won by Democrats masked growing party fissures and fragile coalitions. It’s possible — though many historical norms have been shattered this year — that the same thing is happening in the Republican Party.

Parties rarely spend long periods completely shut out of the national government, but it has happened a few times. After Abraham Lincoln became the first Republican president in 1861, the party won every presidential election (with the possible exception of 1876, in which the party lost the popular vote and won in the Electoral College under questionable circumstances) until 1884. But during this period, after years of a Republican lock, the Democrats started winning House majorities in the 1870s.

Long periods of unified government are rare in American politics, and since World War II, they have become even less common. Since Harry Truman left office in 1953, ending a 20-year run for the Democrats, only one election has returned the same party to the presidency for a third term — in 1988, when George H.W. Bush was elected to succeed Ronald Reagan. During this 12-year period, the Democrats controlled one or both houses of Congress. Although the Democrats controlled the House of Representatives for 40 years beginning in 1955, party control of the presidency alternated regularly. Nevertheless, periods of unified government still happen, like the one that will be begin in January.

What do parties do in the wilderness? They wage internal battles. Repeated losses lead to recriminations about candidates, tactics and messages. During the four years of unified national Democratic government under Jimmy Carter, the Republican Party’s conservative and moderate factions battled each other. As Philip Klinkner notes in his book “The Losing Parties,” conservatives in the party blamed moderates such as President Gerald Ford and Mary Louise Smith, chairwoman of the Republican National Committee, for losing the 1976 election. But conservatives themselves could not agree on who would represent them on the RNC.

During the 1920s, Democrats experienced an even deeper level of disarray. They were divided on the issue of alcohol (wets vs. dries). Reformers clashed with those who wanted to keep a traditional approach to party politics. Prominent members of the party disagreed on their positions on the Ku Klux Klan. Really. In 1924, delegates to the Democratic convention needed 103 ballots to nominate John W. Davis.

In 1952, after 20 years of nearly unbroken Democratic rule, the Republicans nominated the enigmatic Dwight Eisenhower. But his nomination was contested by Sen. Robert Taft, an Ohio conservative, who favored a much sharper rejection of the New Deal and had a very different foreign policy vision. Tension in the party — which included a rancorous convention — illustrated the questions that out-parties face about how strenuous their opposition should be.

Rejected parties also build. Amid decisions about what went wrong, whom to nominate and which values to emphasize, losing parties have to think about their organizational abilities. One result of the Republicans’ long walk through the wilderness during the New Deal years was Operation Dixie, a project to build up the party in the South. Leaders sought to take advantage of the divisions within the sprawling Democratic coalition over race and civil rights. (It should be noted that this didn’t happen until after Eisenhower won two presidential elections in a row.) More recently, the “50 state strategy” engineered by former Democratic National Committee Chairman Howard Dean came after the Democrats’ big losses in the 2002 and 2004 elections.

And they change. During long stretches of minority status, parties also change their ideological positions and priorities. After losing three consecutive presidential elections in the 1980s, the Democratic Party in 1992 moved to the center, nominating Bill Clinton, who promised to be a “new kind of Democrat.” After a long losing streak in the 1920s, the Democrats evolved into the party of the New Deal, advocating a social safety net and broader economic regulation. This identity brought in elements of the party’s previous economic populism and regulation agenda under Woodrow Wilson. But it also represented a sharp pivot away from the party’s historical emphasis on civil rights and distrust of government.

More recently, the result of Republican internal battles during the Carter years was a party that turned to the right on most issues and embraced a socially conservative policy agenda.

When parties are shut out of power, the conversations about how to respond can lead to change. But parties in power also change. After George W. Bush’s two terms, the divisions between his party’s more establishment wing and its populist contingent had begun to emerge. While the traditional wing of the Republican Party stressed economic issues and business concerns, cultural issues such as same-sex marriage and immigration reform motivated the populist faction. During the Obama administration, the Democratic party has moved to the left on economic and social issues. Like George W. Bush, Barack Obama will not be succeeded by a president of the same party. But as with parties out of power, the priorities and ideological commitments of parties in power are constantly in flux.