Shonda Rhimes, Kerry Washington, Ellen Pompeo and Viola Davis appeared in a campaign video endorsing Democratic presidential candidate Hillary Clinton. (YouTube/Hillary Clinton)

In Shonda Rhimes’s world, a former first lady is running for president.

While her husband occupied the Oval Office, it was revealed that he had an affair with someone who worked for him, a public controversy that cast scrutiny on her role as his wife. But the first lady was also a politician, and went on to serve in the U.S. Senate.

Today, it’s her presidential campaign that is dominating the airwaves.

This is the story of Mellie Grant, a character in Rhimes’s ABC political thriller “Scandal.” A fictional character, in a fictional Washington.

But it is also, of course, the story of Democratic presidential candidate Hillary Clinton, give or take a stint as Secretary of State and a much lengthier resume.

Parallels between the tangled plot lines of Shondaland and America’s current political reality are likely no coincidence — especially now that Rhimes has explicitly connected the dots herself.

In a campaign ad that aired shortly before the GOP presidential debate Thursday night, Rhimes and the leading actresses in her hit ABC shows — Kerry Washington of “Scandal,” Viola Davis of “How to Get Away With Murder” and Ellen Pompeo of “Grey’s Anatomy” — expressed their support for Clinton.

“Every day I wake up and play a brilliant, complex, overqualified, get-it-done woman, who obsessively fights for justice,” the three actresses said in turn. “Who cares, who gives a voice to the voiceless, who gets knocked down and always gets back up.”

The spot capitalized on Rhimes’s talent for creating strong female characters.

“I make television about the kind of characters I imagine we all can be,” she says, as the actresses chime in. “Strong, but flawed. Human, but extraordinary.”

“Our characters are on television,” Washington says. “But the real world?”

“The real world has Hillary Clinton.”

(To complete the blurring of reality and fiction, the commercial was directed by Tony Goldwyn, who plays the Republican president in “Scandal.”)

The star-studded endorsement comes on “#TGIT” (“Thank God It’s Thursday”), the night on which all three of Rhimes’s shows air. Rhimes and Clinton exchanged supportive words on Twitter.

Clinton visited the set of “Scandal” last month, as documented in Instagrams from the cast using the hashtag “#ImWithHer.”

#imwithher

A post shared by Kerry Washington (@kerrywashington) on

The backing of Shondaland may further widen Clinton’s lead over Vermont Sen. Bernie Sanders among minority voters. Rhimes is a champion of diversity on network television — inciting the public to see diversity as the new “normal” — and has been credited with paving the way for shows like “Empire.”

Meanwhile, Davis made history last year as the first African American to win the Emmy for Outstanding Lead Actress in a Drama Series. Her emotional speech tackled the issue of minority representation head-on:

‘In my mind, I see a line. And over that line, I see green fields and lovely flowers and beautiful, white women with their arms stretched out to me over that line, but I can’t seem to get there no how. I can’t seem to get over that line.’ That was Harriet Tubman in the 1800s. And let me tell you something, the only thing that separates women of color from anyone else is opportunity. You cannot win an Emmy for roles that are simply not there.

She thanked Rhimes and her fellow actresses of color for “taking us over that line.” Thursday’s ad suggests that, in her eyes, Clinton may be capable of performing the same function in office.

Despite outreach efforts and support from rapper Killer Mike and writer Ta-Nehisi Coates, Sanders has struggled to reduce Clinton’s sizable lead with black voters.

“It’s good to have new friends,” Rep. Hakeem Jeffries, a Democrat from New York, told The Washington Post last month. “I would prefer to have a true friend. Hillary Clinton has been a true friend to the African American community for the last 40 years.”

True friends are hard to come by in the “Scandal” universe, which draws its dramas from betrayals and duplicity. But Rhimes and company evidently think they have found one in Clinton, a “bonafide, rolls-up-her-sleeves, fights-for-what’s-right, in-it-for-you, won’t-back-down champion for all of us.”