To a student of French history, the intrigues and cast of characters rotating in and out of the White House — such as the recently resigned communications director, Hope Hicks — seem ripped from the pages of the court of Versailles in pre-revolution France.

Much like the current occupant of the White House, kings in the centuries before the French Revolution of 1789 were often incurious, spoiled autocrats, surrounded by a coterie of comely female enablers who offered a sympathetic ear, political advice and diversions for men who were often not well equipped to carry out the tasks to which they were born. Among these women, the royal mistress was the most powerful, closest to the king and best able to facilitate access to him.

President Trump, though his record of appointing women to Cabinet-level positions has lagged behind some of his predecessors, has surrounded himself with a similarly situated group of women — though none has a sexual relationship with him. They are among his closest advisers, thanks to their ability to understand and soothe his moods, offer keen advice and, most important, demonstrate absolute loyalty while remaining in the background — leaving the spotlight to Trump.

Despite the breathless historical fiction and salacious television productions that paint royal mistresses as scheming bombshells, the reality was quite different. They were, in fact, powerful political players, and although beauty was an essential component of these mistresses’ image, more important were political savvy and a soothing touch.

In an absolutist political regime — based on the theory of Divine Right — the king was the only openly recognized political actor. Yet men and women who worked in the king’s household, which was the locus of government, wielded both formal and informal power behind the scenes.

The basis of political power for both sexes was patronage, by its nature personalized and informal. The king staffed his court with those he trusted and wanted close to him. So while the mistress usually had another “official” title, her role as companion to the king was the source of her power.

Madame de Pompadour, Louis XV’s official royal mistress and the most famous of royal mistresses today, was most valued for her ability to comfort and divert the notoriously melancholic and easily bored ruler she served with theater, music, constant travel (to places such as Compiègne and Fontainebleau, the Mar-a-Lagos of the mid-1700s) and intimate dinners with a few close friends. Pompadour was also expert at managing Louis XV’s moods, and she served as an important gatekeeper for the king, who disliked dealing with courtiers lobbying for favors. At her daily toilette, Pompadour received petitioners and listened to their requests while she publicly applied her makeup; subsequently she interceded with the king on behalf of these petitioners as she saw fit, sparing him the need to handle that job on his own.

Contrary to popular perceptions, sex was not the defining characteristic of the relationship between king and mistress. Rather, it was trust and confidence. For example, the nature of the relationship between Henri II and the woman recognized as his mistress, Diane de Poitiers, was deliberately ambiguous: She was 20 years older than he was, and she effectively shrouded the nature of their relationship in mystery. Louis XV’s sexual relationship with Pompadour lasted only five years; however, she maintained her position as “official mistress” and his most respected and beloved adviser for 15 years after it ended.

Royal mistresses were not the only women who advised French kings. While female courtiers often officially held positions in the queen’s household such as ladies-in-waiting — attendants to the queen — their titles cloaked their most important tasks: advising the king, stroking his ego and providing pleasant company, which meant they could promote the interests of their family and friends.

The special status of French women in the court of the Old Regime was possible in part because of a paradoxical view that women were as intelligent as their male counterparts, even though they were legally inferior. Their legal inferiority made them less threatening as political actors, since they could seldom achieve status and authority independent of powerful male protectors. Consequently, the women surrounding the king were among his most loyal and vociferous supporters, which created trust with the king. This trust, in turn, enabled these women to serve as valued counselors and intermediaries.

This power dynamic helps us understand the prevalence of women in Trump’s inner circle, even as he has shown open hostility toward gender-equity issues. Female advisers, most especially Hicks, have played a role similar to royal mistresses and courtiers in Old Regime France — wielding enormous influence — though, of course, without any of them being Trump’s mistress.

Hicks was known for her ability to soothe Trump and comprehend what drives him, as well as for her absolute loyalty. She also served as a conduit to the president for journalists. Like the best-known royal mistresses, Hicks cultivated a persona both visible and veiled: always present, obvious to those who recognized her close relationship with the president (she is ever-present in Michael Wolff’s “Fire and Fury”), while also managing to remain mysterious and hidden from the public at large until her boyfriend, staff secretary Rob Porter, was engulfed in a firestorm because of the news that he had abused his two spouses. Hicks’s dislike of the spotlight and absolute loyalty were incredibly valuable to a president who seems to value loyalty and discretion above all else from aides — male or female.

Trump seems to share the attitude of French kings about his female advisers. Even as he stands accused of affairs with porn stars and of harassing and even assaulting women, he also appears to respect their intelligence and is willing to bring them into his inner circle, as long as they as long as they fit his image for their roles (a criterion essential for all of Trump’s appointments — Senator Bob Corker’s height reportedly played a role in Trump not selecting him as Secretary of State) and show appropriate feminine deference and loyalty: Hicks as communications director, Kellyanne Conway as counselor, Omarosa Manigault-Newman as director of communications for the Office of Public Liaison (now former), and Ivanka Trump as assistant to the president. Their power derives less from the inherent power of their title than from Trump’s favor.

Despite the title of first lady, Melania Trump does not appear to be a key member of the president’s female entourage; like French queens, she maintains a separate household.

Trump allows these women into a special, cordoned-off part of his inner sanctum, one that seems designed for women only — Hicks maintained an office so close that he could summon her with a bellow. Unlike some of his male advisers — Stephen K. Bannon comes to mind — these women seem to realize intuitively that the key to maintaining Trump’s favor is remaining in the background and not outshining the notoriously narcissistic president. The relatively low profile of Hicks, Conway (who is far less visible on television than she was in the early days of the administration) and even daughter Ivanka explain why they are some of Trump’s most trusted advisers. They offer comfort, not competition.

The disconnect between Trump’s close female advisers and the dearth of women appointees to Cabinet-level positions — where they would exercise power in a more independent fashion — is also telling. Trump demonstrates no particular interest in promoting women to these jobs on the basis of their superior talents. Rather, it is beauty and the softer skills that attract the attention and approval of this president.

While we all welcome the fact that women can achieve influential positions in the White House, it is discouraging that, much as was the case 300 years ago, the women whose names we know best in this administration are those who provide cover for and who try to manage the moods of an incurious, spoiled leader. And it is yet another testament to the strangeness of this particular historical moment that we can profitably turn to the gendered ethos of a long-ago absolutist state to understand the dynamics of a very unusual White House.

This article has been updated.