The Republican presidential candidate’s affair could be exposed before the election, so the other woman’s silence was bought. Another woman wrote a tell-all book about her love life with the same married man. Long before Donald Trump and Stormy Daniels, there was President Warren G. Harding, whose sexual dalliances made history.

In 1920, the Republicans nominated Harding, a senator from Ohio, to run against Democratic Gov. James Cox, also of Ohio, and his running mate Franklin Delano Roosevelt. Only then did GOP leaders learn their handsome, white-mane standard-bearer had some kinky skeletons in his closet. One was a long-running affair with Carrie Fulton Phillips, the wife of the head of a department store in Marion, Ohio, where Harding was a newspaper publisher.

The affair had cooled, and now Phillips threatened to release some steamy love letters, unless she was paid. In one letter, Harding wrote his lover that he longed to see her so much “I feel that there will never be any relief until I take a long, deep, wild draught on your lips and then bury my face on your pillowing breasts.”

That was one of the milder letters.

The illicit affair could sink a presidential candidate. So the Republican Party paid Phillips and her husband $20,000 and sent them on an all-expenses paid voyage overseas until the election was over.

Today that $20,000 would be worth about $250,000. That is nearly double the $130,000 Trump paid Daniels before the 2016 presidential election to keep quiet about their alleged affair. And she did not get a free trip.

On Tuesday, Daniels published her memoir “Full Disclosure,” which includes details of her alleged Trump tryst. It follows the lead of Nan Britton, with whom Harding had an affair after he was elected with a campaign promise “to return America to normalcy.”

Britton, who was three decades younger than the 54-year-old Harding, also was the mother of their child, a daughter whom the president never saw. The couple had sex throughout the White House, frequently in a very large cupboard near the president’s office. While this was going on, the Secret Service kept close watch for Harding’s ever-suspicious wife, Florence, who was known as “the Duchess.”

The genial Harding was a popular president. He boasted about what would prove to be a short-lived economic recovery. He supported tax cuts for businesses and the rich, backed higher tariffs and supported limits on immigration. The president largely ignored the details of government. When his Interior Secretary Albert Fall brought him an executive order to secretly transfer some U.S. Navy oil reserves in Wyoming to the Interior Department, Harding signed the order without bothering to read most of it.

The federal oil lands were in a place called Teapot Dome. Fall was taking bribes to allow private oil companies to drill on the property. In 1922, Harding suddenly found his administration under an initial investigation by Congress into the brewing Teapot Dome scandal.

To get away from Washington, in the summer of 1923 Harding and his wife took a goodwill trip to the territory of Alaska and then went by train down to California. Harding fell ill and in San Francisco, on Aug. 2, 1923, the president died of a sudden heart attack. He was 57 years old. An FBI agent accused Florence Harding of poisoning her husband out of jealousy over his affairs, but never produced any evidence.

Most of the scandals of sex and corruption in Harding’s administration did not become fully known until after his death. Fall was convicted of bribery in 1929. Two years earlier, Britton published a best-selling book about her affair with the late president and their child. Britton was angered because she was not included in Harding’s will and payments for their child were stopped. Harding supporters called Britton’s kiss-and-tell book fiction and fake news.

It was not until 2015 that modern DNA testing proved Britton’s claim that Harding was the father of their child. In 2014 the hot love letters of Harding and Britton were published over the objections of Harding’s descendants.

In the end, Harding left a legacy that was a cautionary warning for future philanderers in chief: Hell hath no fury like another woman scorned.

Ronald G. Shafer is a former Washington political features editor at the Wall Street Journal and author of “The Carnival Campaign. How The Rollicking 1840 Campaign of Tippecanoe and Tyler Too Changed Presidential Elections Forever.”

Read more on Retropolis: