A critical election loomed. The country was deep in recession. And a deadly virus had infected hundreds of thousands of Americans, including the president.

The country was bitterly divided, and there had been deadly and widespread racial strife. The world was “a wreck,” a young college graduate wrote — “knocked to pieces, leaky, red-hot, threatening to blow up.”

“We have seen hideous peculation, greed, [and] anger,” he wrote. “We have seen entire social systems overthrown, and our own called in question.”

It was 1920, and the author was John F. Carter Jr., the 23-year-old son of a minister, who was just out of Yale, and who in later life would be a fixture in Washington political circles.

His essay, “These Wild Young People,” in the Atlantic Monthly that September, was the cry of a disenchanted generation, “faced with staggering problems [in] a badly damaged world.”

It was also a prologue to the Roaring Twenties, the legendary decade of glittering excess, great literature and technological revolution.

As another election looms amid economic and social turmoil, and another pandemic claims American lives, a look back at the 1920s may be instructive for the 2020s.

This was the dawn of the Jazz Age, a time marked by the cynicism born of the catastrophe of World War I, and the cultural upheaval that followed.

“Torn nerves craved the anodynes of speed, excitement, and passion,” the historian Frederick Lewis Allen wrote of the period.

The novelist F. Scott Fitzgerald is said to have called it “the most expensive orgy in history.”

It was the era of champagne and raccoon coats, spit curls and “makin’ whoopee.”

There was radical change in culture, morals, music and dance.

“The music is sensuous, the embracing of partners — the female only half dressed — absolutely indecent,” the Cincinnati Catholic Telegraph complained, according to Allen. “And the motions — they are such as may not be described … in a family newspaper.”

“Our music is distinctly barbaric,” Carter wrote.

He was speaking, perhaps, of jazz, the rowdy new genre that gave its name to the period.

In 1922, Fitzgerald, 26 — “the amazing young Fitzgerald,” Carter called him — published “Tales of the Jazz Age,” a collection of short stories.

“Never had there been such splendor in the great city,” one story began.

Women had just won the right to vote in 1920, a right that would play a crucial role in another election a century later.

“Freedom of action, liberty of thought, the rights of individuals — all these … surround us, threaten us, excite us, and tempt us,” an anonymous young woman wrote in the Atlantic that year.

But Prohibition, the constitutional ban on the manufacture and sale of alcoholic beverages, also had gone into effect in 1920, with relatively little debate, Allen recounted.

Carter, though, lamented the “perils of tame living,” and wrote of a “A draconian code … being formulated at Washington.”

Alcohol continued to be available illegally via bootlegging, drug prescription and the efforts of organized crime. And its consumption became a signature of the times — “a sexy, mysterious, splendidly illicit thing,” the scholar Julie M. Irwin has written.

Other cultural change was afoot.

Hundreds of thousands of African Americans, hoping for better lives, had begun the Great Migration, leaving the poverty and racial oppression of the rural South and heading to cities in the North.

But they were greeted with waves of racial violence — lynchings, riots, and a resurgence of the Ku Klux Klan.

In 1921, mobs of White vigilantes attacked a Black neighborhood in Tulsa, burning looting and killing possibly hundreds of people.

And in 1925, 30,000 robed Klansmen marched through the streets of Washington and were cheered by onlookers.

Amid the social convulsions, advances in technology were dizzying.

In 1919, radio broadcasting had been almost unheard of, Allen, the historian, wrote. But much like the Internet and the cellphone, radio would shortly “alter the daily habits of Americans … profoundly,” he wrote.

A pioneering broadcast station had been opened in East Pittsburgh on Nov. 2, 1920, to carry election returns, he wrote. Within a year, the radio “craze” had taken off.

“There is radio music in the air, every night, everywhere,” a San Francisco newspaper reported.

In 1922, sales of radio sets, parts and accessories amounted to about $60 million, Allen reported in his book, “Only Yesterday, An Informal History of the 1920s.” By 1929, the figure was $842 million, roughly $11 billion today.

Soon, radio had penetrated “every third home in the country … and tenement-house roofs [were] covered with forests of antennae,” Allen wrote.

Stunning feats of aviation made front-page headlines.

By 1919, two British aviators, John Alcock and Arthur Brown, had already made the sensational first nonstop flight across the Atlantic. They flew from Newfoundland in a twin engine, open-cockpit biplane and landed in a bog in Ireland.

The achievement “was the final goal of all the ambitions which flying men have ventured to dream,” the New York Tribune announced.

The Tribune was wrong.

That same year, a New York Hotel owner, Raymond Orteig, offered $25,000 — roughly $370,000 today — for the first nonstop flight between New York and Paris. Competition was fierce and claimed several lives.

Finally, in 1927, former airmail pilot Charles Lindbergh completed the trip, won the prize and became an international hero.

As the election of 1920, approached, the global influenza pandemic was still killing people across the country, although it seemed to be tapering off.

Some people wore masks, but there was insufficient quarantining. More than 600,000 eventually would die.

President Woodrow Wilson had a frightening case of the influenza at the post-World War I peace talks in Paris. The severity of his condition was kept from the public.

His personal secretary, eldest daughter and members of the Secret Service also became ill.

By the fall of 1920 Wilson sat in the White House partly paralyzed, but not by the flu.

In October 1919, he had suffered a severe stroke, collapsing on the bathroom floor after an exhausting cross-country train journey to gain approval of the League of Nations, according to the biographer A. Scott Berg.

The effort was doomed. And although Wilson was an invalid, he had still wanted the Democratic Party nomination for a third term in 1920.

But he was too frail. And Democrats chose Ohio Gov. James M. Cox to head their ticket, and picked as running mate, a 38-year-old former assistant secretary of the Navy named Franklin D. Roosevelt.

Republicans nominated the genial U.S. Sen. Warren G. Harding, of Ohio, and Massachusetts Gov. Calvin Coolidge as his running mate.

Harding, who historians say had at least two extramarital affairs and had fathered a daughter with a mistress, campaigned on the theme “Return to normalcy.”

“Harding looked back with longing eyes to the good old days when the government didn’t bother business men with unnecessary regulations, but provided them with fat tariffs,” Allen wrote. He “was for America first.”

But he was unsuited for the presidency. Treasury Secretary William McAdoo called Harding’s speeches “an army of pompous phrases moving over the landscape in search of an idea.” And his administration would be marred by scandal.

Still, on Nov. 2, 1920, he was elected in a landslide — and announced that he was going on vacation.

The Washington Post said it had been terrible idea for Wilson “to commit the United States to a course of folly in merging its identity with other nations in a chimerical league of nations.”

“All hail the newly elected President,” the paper said.

As for John F. Carter, the Atlantic essayist, he went on to a distinguished career as an author, columnist and New Deal confidant of President Franklin Roosevelt and, later, Harry Truman.

“We’re men and women, long before our time,” he had declared at the start of the decade. “Mistakes will be made, but we shall at least make them intelligently.”

Read more: