Hillary Clinton wrote a lovely letter to an 8-year-old girl who lost her class election

Hillary Clinton knows a thing or two about tough election losses.

That's apparently what compelled the former 2016 candidate for president to write a letter to 8-year-old Martha Kennedy Morales. The school-aged girl recently faced off against a boy from her class in an election for class president, and she lost by one vote.

SEE ALSO: Elon Musk and Mark Zuckerberg face off in Epic Rap Battles of History

The story of what happened to Morales, who attends school in a Maryland suburb of Washington, D.C., made its way to Clinton via a grapevine of D.C. insiders, The Washington Post reports. Frequent Facebook posts from Albert Morales, Martha's father, about the class election caught the eye of an unnamed Clinton associate, who mentioned it to the former candidate.

Clinton spokesperson Nick Merrill confirmed the letter's authenticity.

Just like Clinton, Martha dealt with some drama leading into an election that ended with her taking on the class's vice president role, as the runner-up. After the first round of votes were cast, six ballots were invalidated because students didn't fill them out correctly. Then, in a subsequent second vote, Martha lost by just one.

Clinton opened her letter with a nod to the Facebook posts from Martha's dad and a hearty congratulations for the young girl's vice president win. Then she shared some wisdom from her own perspective of having lived through a hotly contested election race for a position that's traditionally been a boy's club.

What a lovely story, and a sweet message to send to this passionate, young girl. Today's kids are tomorrow's leaders, after all.

WATCH: Presidents in short-shorts: A jog down memory lane

Https%3a%2f%2fblueprint api production.s3.amazonaws.com%2fuploads%2fvideo uploaders%2fdistribution thumb%2fimage%2f86971%2f324d28d3 922e 4ce7 a3f2 6bed9886ece3
Https%3a%2f%2fblueprint api production.s3.amazonaws.com%2fuploads%2fvideo uploaders%2fdistribution thumb%2fimage%2f86971%2f324d28d3 922e 4ce7 a3f2 6bed9886ece3