An 8-year-old girl who ran and lost an election for class president received a condolence letter from Hillary Clinton — a woman who knows what it’s like to lose on a national scale.

Martha Kennedy Morales is a third-grade student at Friends Community School, a private Quaker school in Maryland. As part of its curriculum on U.S. government, Friends Community recently held elections for class president and Congress. Morales, wanting to win the top spot, ran for president among her mixed class of third and fourth grade students.

Her opponent was a fourth-grade boy.

Even in the seemingly inconsequential election at Friends Community, there was controversy. A second vote was required after six ballots were filled out incorrectly and deemed invalid. In the second election, Morales lost by just a single vote.

Morales’s father became involved during the campaign, writing updates and posting the results on his Facebook account. News of the results eventually traveled into top Democratic circles, with political activist Bryan Weaver telling The Washington Post a friend of his “welled up with tears” at the news of her loss.

Someone who knew Hillary Clinton informed the 2016 Democratic presidential nominee of Morales’s razor-thin defeat.

Clinton decided to send Morales a letter, telling her she knows what it’s like to run in a contest among boys.

“While I know you may have been disappointed that you did not win President, I am so proud of you for deciding to run in the first place. As I know too well, it’s not easy when you stand up and put yourself in contention for a role that’s only been sought by boys,” she wrote in her letter, dated Dec. 6. “The most important thing is that you fought for what you believed in, and that is always worth it.”

Since losing the 2016 presidential election to real estate mogul Donald Trump in what has been described as the biggest political upset in U.S. history, Clinton has gone on to make numerous excuses for her defeat. The former secretary of state explicitly blamed “old fashioned sexism.” She has gone on to speak at female forums about misogyny and the role of women as well.

Clinton spokesman Nick Merrill confirmed the authenticity of the letter.

“My mom was just picking me up from school, and she pulled the letter out of her purse,” Morales explained. “I opened it up, and it was a letter from Hillary Clinton. I was very surprised.”

Oh nothing, just crying reading this letter Hillary Clinton sent to a third grader who lost her bid for class president, to a boy, by one vote. pic.twitter.com/My3RugIMLK — Ally Maynard (@missmayn) December 16, 2018

She said she is working on a thank-you note. (RELATED: Ticket Prices To See Bill And Hillary Clinton Speak Tank)

Unlike Clinton, however, the third-grader was able to earn a position from her election outcome. Morales was declared vice president of her class, giving her the ability to serve as a tie-breaker between the House and Senate, and she will hold meetings with the class president.

Follow Jason on Twitter.

Content created by The Daily Caller News Foundation is available without charge to any eligible news publisher that can provide a large audience. For licensing opportunities of our original content, please contact licensing@dailycallernewsfoundation.org.