In a recent interview with political news site Axios, 2020 presidential candidate Pete Buttigieg claimed if elected, he probably would not be the first gay president of the United States.

“I would imagine we’ve probably had excellent presidents who were gay, we just didn’t know which ones” Buttigieg said. “I mean, statistically, it’s almost certain.”

Is he right?

Statistically speaking, researchers put the current lesbian, gay, bisexual and transgender population in the U.S. at 4.5 percent. Given that there have been 44 presidents — and, prior to the past few decades, it is assumed most LGBTQ people did not live openly — Buttigieg could have a point.

Historians have speculated that Abraham Lincoln had an intimate relationship with lifelong friend Joshua Speed, as well as the captain of his bodyguards, David V. Derickson. These relationships, some contend, explain his tumultuous marriage to Mary Todd.

Abraham Lincoln on Nov. 8, 1863. Alexander Gardner / AP

Perhaps the most frequently mentioned name in discussions of homosexuality and the presidency is one-term President James Buchanan, elected in 1856.

As a young man, Buchanan was engaged to Anne Coleman, the 24-year-old daughter of an iron magnate, but she died before the two tied the knot. Buchanan was reported to have never openly courted a woman after Coleman’s death and died a bachelor at the age of 77.

Many observers suggest that Buchanan may have been gay, pointing to his relationship with Alabama Senator William Rufus King. Buchanan and King lived together in a boarding house for a decade, and their closeness led Andrew Jackson to refer to them as “Miss Nancy” and “Aunt Fancy.”

Apart from his distinction as the only bachelor president, Buchanan is widely regarded as one of the worst presidents. The divide between the North and the South deteriorated during his administration and set the stage for the Civil War in 1861.

COMPLICATED HISTORY OF SEXUALITY

So, we have had a gay commander-in-chief! Not so fast, say historians of gender and sexuality.

“I would never in a million years call James Buchanan gay,” James Downs, professor of history at Connecticut College, told NBC News. Downs also dismissed the claim as applied to Lincoln.

“It’s a different historical moment,” Downs explained. “Men have been in intimate relationships with men,” he clarified, “but they are not ‘gay,’ they are men who had sex with men.”

Indeed, Downs found Buttigieg’s comments “deeply problematic” and representative of the lack of public knowledge about the histories of gender and sexuality.

Downs doesn’t blame Buttigieg though. “It’s not totally his fault. It’s because it’s not taught.”

“The notion of being gay is brand new concept that doesn’t [emerge] until the late 19th, early 20th century,” and, he added, was only a sexual identity that could be claimed proudly in the decades after the 1969 Stonewall uprising.

Portrait of President James Buchanan, who served from 1857-1861. Library of Congress / Reuters

During James Buchanan’s life, Downs explained, to engage in same-sex intimacy “would be considered immoral in the same way that masturbation or adultery was.”

Thomas J. Balcerski, a history professor at Eastern Connecticut State University, whose book “Bosom Friends: The Intimate World of James Buchanan & William Rufus King” examines their relationship in detail, told NBC News that it’s important to look at the historical context of Buchanan and King’s relationship.

Both Buchanan and King “fit into a world of bachelorhood in politics in the 19th century,” Balcerski said. In fact, Buchanan and King roomed together with several other Democratic congressmen from the South at the time.

Buchanan had what Balcerski prefers to call a “friendship” with King. “Friendship was a multivalent concept that by no means excluded intimacy,” Balcerski said.

FROM STONEWALL TO THE ‘RAINBOW WAVE’

Some might say the distinction Downs and Balcerski make is just a matter of semantics that pushes LGBTQ figures out of the history books. Indeed, in the 1970s, many activists and historians dedicated themselves to uncovering the sexual histories of historical figures in order to correct for the erasure of queer lives and relationships.

Balcerski called this “finding a usable gay past,” and it’s what he believes motivates the impulse to declare that James Buchanan was gay.

“The kind of answer we want is elusive,” Balcerski admitted, but he argued to make a statistical argument based on contemporary surveys of sexual and gender identity, or to use the term “gay” to refer to intimate same-sex friendships or same-sex romance is to impose a contemporary worldview on 19th century social relations.

It also downplays the significance of Buttigieg’s candidacy.

“Buttigieg is the first to actually say ‘I’m gay, and this is my partner, and this is when I came out,’” Downs said. “I think he gains more traction and more power by saying, ‘I’m the first.'"

Despite the historic “Rainbow wave” of LGBTQ candidates elected in 2018, far less than 1 percent of all elected officials are openly LGBTQ. Research shows political representation matters when it comes to which policies are advocated for and adopted.

“The whole power of the 50th anniversary of Stonewall is when people stop accepting the terms and labels placed on them,” Downs said. “Buttigieg is tapping into the legacy of Stonewall.”

FOLLOW NBC OUT ON TWITTER, FACEBOOK & INSTAGRAM