Catherine the Great was a nearly penniless noble from a small German principality who married the unstable heir to the Russian throne, who treated her abominably. She ousted him in a coup, (probably) had him killed and ruled the empire for the next 34 years, becoming one of Russia’s greatest monarchs.

And in the Hulu series “The Great,” her story is hilarious. Really. The basic outline of Catherine’s story is there, sort of.

“She went to a country she didn’t even know,” said creator/writer/executive producer Tony McNamara. “She took it over, she started female education, she kept the Enlightenment alive, she invented the roller coaster. … So that seemed like a fascinating story to tell for us. But I also didn’t want to get bogged down in all the detail.”

Nah. Leave that to documentarians. Or to HBO’s recent miniseries “Catherine the Great,” which tried to get the details right.

In “The Great,” Peter III (Nicholas Hoult) is the son of Peter the Great; he’s already the czar when Catherine marries him; and he consumates their marriage — while he’s chatting with his friends — shortly after the wedding.

In reality, Peter III was another minor German noble who was the grandson of Peter the Great; he didn’t ascend to the throne until 17 years after he married Catherine; and, depending on who you believe, he either didn’t consummate his marriage at all or finally got around to it years after the wedding.

Not that it matters. This is “an occasionally true story,” as Hulu puts it. It’s a farce. It’s also a deeply disturbing drama that’s utterly horrifying as Peter III behaves very, very badly toward his wife and pretty much everyone else.

Horrifying and funny. Like when Peter tells a crowd he’s “happy to hear anyone’s problems with me” as half a dozen people he’s had killed hang behind him. “Don’t worry about the bodies,” he says with a wave and a smile.

“The reason I wanted to do it was because, basically, I knew one thing about Catherine the Great — which was maybe she fornicated with a horse,” McNamara said. “Which, of course, we allude to in the show,” interjected Elle Fanning, who stars as Catherine. “Because we’re that show.”

According to Robert K. Massie’s biography “Catherine the Great,” and a lot of other sources, that story was invented by the empress’ enemies. But “The Great” isn’t all that interested in facts.

“We pride ourselves on not being historically accurate, I would say,” Fanning said.

(Photo courtesy of Andrea Pirrello/Hulu) Executive producer/writer Tony McNamara, center, and cinematographer John Brawley, right, during production on "The Great."

Peter beats and tortures Catherine. And there are sight gags bordering on slapstick. The tone is not unlike the 2018 film “The Favourite,” which McNamara co-wrote. He was nominated for an Oscar; Olivia Coleman won one as best actress.

That black comedy was set in the British royal court in the early 18th century, and Hoult co-starred as the absurd villain — a character not dissimilar to Peter III.

Hoult said McNamara’s “The Favourite” script “made me cackle out loud.” And when he read the role of Peter, “There’s all those brilliant turns of phrase and lines of dialogue that you’d never expect to see or get anywhere else.”

It’s just a coincidence that both are period pieces, a genre McNamara doesn’t particularly care for. “When I see people tying their shoes with ribbons, I want to kill myself,” he said. “The Great” is “about a woman who marries the wrong person and then has to go, ‘What do I do? Do I kill him?’ And that seemed a contemporary question.”

The hard part might be trying to figure out which nonsensical things are invented and which are real.

“There’s also lots of details that are completely strange that turn out to be true,” McNamara said. “Like odd methods of contraception and odd methods of pregnancy testing that are so bizarre you think we made them up, but they’re all kind of accurate.”