Cyrus, who is doing a weeklong residency at The Tonight Show, held back tears as she wrote her thank you note

See Miley Cyrus Break Down in Tears in Hillary Clinton’s Arms During Fallon's ‘Thank You Notes’ Segment

America’s first female presidential nominee Hillary Clinton was showered with thank you’s on Wednesday night by the female writing staff of The Tonight Show Starring Jimmy Fallon — and a teary-eyed Miley Cyrus.

During the 69-year-old politician’s visit to the NBC late night institution, Clinton took part in Fallon’s popular “thank you” segment — where the host writes letters of appreciation to the people, places, and things for which he’s most grateful.

Get push notifications with news, features and more.

Rather than Fallon running the bit, he passed his pen onto the women of his staff (Albertina Rizzo, Becky Krause, Caroline Eppright, Marina Cockenberg, Jo Firestone, Jasmine Pierce, and Taryn Englehart) so they could express their thanks.

“You’ve inspired so many people around the country, including many right here on our staff at The Tonight Show,” Fallon told the former secretary of state. “I know that our female writers, in particular, are big fans of yours, and they wanted to thank you in person.”

Image zoom Hillary Clinton and Miley Cyrus

Cyrus, who is doing a weeklong residency at The Tonight Show, also participated — holding back tears as she wrote her note.

“Thank you, Hillary for being a constant beacon of strength, hope, and determination for me and millions of other young women,” she said. “You’ve been a role model and an inspiration and the voice of reason in uncertain times.”

The “Malibu” singer then asked Clinton for something special. “I could go on and on, but I’d like to get right to the point: Can I give you a hug?” she said before the two embraced.

Image zoom Albertina Rizzo, Becky Krause, Caroline Eppright, Marina Cockenberg, Jo Firestone, Hillary Rodham Clinton, Jasmine Pierce, Taryn Englehart, Miley Cyrus and Jimmy Fallon Andrew Lipovsky/NBC

Other notes throughout the clip offered Clinton some well-needed laughs (and made a few digs at President Donald Trump).

“Thank you, Hillary Clinton for handling this transition with more grace than I ever could have imagined,” Pierce said. “That being said, call me day or night and I will be there with a gallon of ice cream and two spoons to tell you, ‘Girl, you are so much better than him!’ ”

“Thank you, Hillary, for all the work you’ve done for public healthcare; ever since the election, I’ve really depended on my government subsidized anti-anxiety medication,” Firestone said.

Eppright’s might have gotten the biggest laugh from Clinton: “Thank you, Hillary, for always sticking to the issues even as people criticize you for superficial things like your hair, your wardrobe and your appearance. You show girls everywhere that politics isn’t a popularity contest — because if it were, you would have won by about 3 million votes.”

RELATED VIDEO: Watch: Natasha Stoynoff Breaks Silence, Accuses Donald Trump of Sexual Attack

After listening to the notes, Clinton sat behind Fallon’s desk to write one of her own.

“Thank you, Miley, The Tonight Show writers and all of the women and young girls out there. You are smart, strong and deserving of every opportunity,” Clinton said. “Together, we’ve made our voices heard, we’ve done great things and we’ve come a long way. But as Miley would say, we can’t stop and we won’t stop.”

Her reference, to Cyrus’ 2013 tune “We Can’t Stop,” had the audience cheery and meant a lot to Cyrus.

“I got my hug!!!!” the 24-year-old former Disney Channel star wrote on Instagram. “@hillaryclinton today was one I will never forget ….. you are endlessly inspiring, & I hope you know how loved / appreciated you truly are.”

“I will never stop speaking up against injustice, fighting for equality, and using my platform to spread peace & love!” Cyrus continued. “I’ve learned from the very best …. You. ❤️💙❤️💙❤️💙 @fallontonight made my dreams come true!”

Not everyone was a fan of the segment, however.

Meghan McCain, daughter of former Republican presidential candidate John McCain, tweeted a snippet of the segment and wrote “When my father lost, we prayed, hiked, grilled a lot of red meat….and then he went back to work and completely moved on.”