Days before congressional elections in 1874, the unthinkable suddenly seemed likely.

Republican dominance in Washington had been a fact of life since 1861, when Abraham Lincoln became president and the party held sway on Capitol Hill. With the election of Ulysses S. Grant in 1868, the party remained firmly in control — and when Grant was reelected four years later in a landslide, the Republican juggernaut seemed unassailable.

But by the autumn of 1874, the political climate had changed dramatically. An influence-peddling scandal, a depressed economy and lingering Southern white resistance to Reconstruction clouded Republican chances as never before. As Americans prepared to vote in elections that would determine control of the House of Representatives (senators were elected by state legislatures), the end of Republican supremacy in Washington suddenly seemed possible.

“The complexion of the next House of Representatives,” the Chicago Tribune predicted on Oct. 26, “is likely to be Democratic.”

That proved to be a colossal understatement.

By the time all the ballots had been counted, Democrats picked up an astounding 94 seats in the 293-seat House. Republicans retained control of the Senate, but the change in the House represented a sea change in American politics. With the exception of one two-year interval (1881-1883), the House would remain in Democratic control until 1889.

“To use the familiar rhetoric of this hour of exultation and discomfiture,” the Democratic New York Herald exulted, “we have the ‘tidal wave’ or rising sea of success.”

Midterm “wave” elections in which one party sweeps on Capitol Hill while the other controls the White House have been a recurring feature of U.S. politics since the early 19th century, historians say. While Tuesday night didn’t quite bring the “blue wave” Democrats hoped for, the party did seize control of the House, while Republicans held the Senate, in a national referendum on President Trump.

After the wave of 1874, many more would follow — including a notable triumph for Republicans 20 years later.

In 1894, after a financial meltdown a year earlier and violent labor strife, Republicans gained 130 seats while Democrats shrank from 218 to 93. The election renewed GOP dominance in Washington as Republicans controlled both houses of Congress and the White House.

In the years that followed, the two parties would take turns surfing midterm waves — Republicans in 1938, 1946, 1994, 2010 and 2014, and Democrats in 1910, 1958, 1974 and 2006. Earlier this year, pundits foresaw a massive Democratic wave on Election Day, but those predictions have given way to more tempered forecasts.

Whatever happens, it is unlikely to match the wave of 1874.

The political climate had begun to change even as Grant cruised to his easy reelection in 1872. On Sept. 4, under the headline “The King of Frauds,” the New York Sun revealed details of a grubby scheme by a Massachusetts congressman to sell valuable stock in a Union Pacific subsidiary to his fellow lawmakers with the intent of promoting the railroad’s interests on Capitol Hill. It became known as the Credit Mobilier scandal and led to three congressional investigations during the winter of 1872-1873. The scandal consumed Washington and embarrassed many of the nation’s most prominent Republicans.

Shortly after the investigations concluded, Congress gave itself a retroactive pay raise — a move that drew immediate and widespread criticism. Even the Republican New York Times was outraged by what soon became widely known as the “salary grab.” “The public will not readily forget a piece of rascality so shameless, so despicable, and so conspicuous,” the Times thundered.

Economic catastrophe added to Republican difficulties. The Panic of 1873 shook Wall Street, closed banks and coal mines, bankrupted railroads and led to widespread unemployment. Hoping to revive the economy, Congress responded with legislation to inflate the currency, but Grant stunned the nation by vetoing the bill. The Herald, reflecting Wall Street’s conservative views about monetary policy, applauded the veto but noted that it elevated “the currency controversy into the foreground as the overshadowing issue of American politics.”

There were other factors at play as well. The massacre of 50 African Americans defending a Republican-controlled county government in Louisiana in 1873 and an ongoing struggle between Republicans and Democrats to control the state government kept Reconstruction in the headlines. White Southerners who violently opposed the enfranchisement of former slaves flocked to the Democratic Party, while many white Northerners were growing weary with the Republican commitment to protecting the rights of newly freed slaves.

In addition, reports that Grant was pondering whether to seek a third term in 1876 — and in so doing disregarding the tradition of presidents serving only eight years — alarmed many in both parties and reinforced fears that the general who led the North to victory in the Civil War favored dictatorial “Caesarism” over democratic government.

All of this created a challenging environment for Republicans. Vice President Henry Wilson admitted as much to the Herald on Aug. 19. He conceded the party would be unable to match its performance in 1872 and urged Republicans to unite. “We require to use all our strength, for our antagonists are watching and wary, and although they have several times committed faults, we must not expect them to perpetuate them. They are preparing to make a strong effort to achieve victory in the coming struggle, and we must, if we hope to succeed, be up and doing.”

Few of his fellow Republicans shared his worries. “Many simply had grown so accustomed to office that they couldn’t imagine America without them in charge,” historian H.W. Brands has written. One Republican who avoided complacency was Rep. James A. Garfield of Ohio, who began his campaign well over a year before he faced reelection as he circulated a monograph in his district defending his conduct regarding Credit Mobilier. He refunded his pay increase and dutifully campaigned in hamlets and market towns throughout his district as the election approached. His efforts paid off — aided by a divided opposition that put up two candidates to run against him, biographer Allan Peskin notes.

Many others were not so lucky. “Rarely has an American political party suffered a defeat on the scale that the Republican Party did in 1874,” historian Richard White writes. By White’s reckoning, Republicans “went from a 70 percent majority to a 37 percent minority in one election.”

One of the most notable defeats came in Massachusetts, with Republican Rep. Benjamin Butler. Notable for his droopy eye, fondness for capes and an unusual gait likened by one colleague to “a bass walking on its tail,” Butler had been at the center of many of the political dramas of the past decade, including the impeachment trial of President Andrew Johnson. He was also the author of the controversial pay raise bill — and his constituents were in no mood to reward him for it.

“Everything was against us, especially the hard times,” Republican Rep. Luke Potter Poland of Vermont told the St. Louis Globe on Nov. 11. But economic hardship wasn’t the only factor powering the wave, Poland noted. The “people got disgusted with the daily revelations of corruption and fraud, and they concluded to hold the party in power responsible for them all.”

Democrats saw that too and used their new majority accordingly. A House investigation led to the resignation and impeachment of Secretary of War William Belknap and uncovered shady dealings in the Navy and Interior departments. The investigations — together with revelations of a Whiskey “ring” in the Treasury Department that connived with distillers to avoid taxes — tarred the Grant administration’s reputation but did little to help Democrats, according to historian Mark Wahlgren Summers.

The reason was a political problem as familiar as the wave election itself, according to a New York Democratic operative quoted by Summers. “In the estimation of the public generally,” S.L.M. Barlow wrote, “our investigations are looked upon as partisan and useless.”

Read more Retropolis: