Mariah Carey poses backstage with her Icon Award. Picture: Reuters

Mariah Carey has sent her "love and congrats" to Lil Nas X after he beat her record for the longest-running number one single on the Billboard Hot 100 chart.

The viral cowboy rapper's mega-hit "Old Town Road" jumped ahead of the 49-year-old superstar's 1995 duet with Boyz II Men, which spent 16 weeks at the top of the chart, as he celebrated his 17th week in the No 1 spot.

Mariah tweeted: "Sending love & congrats to @LilNasX on breaking one of the longest running records in music history! We've been blessed to hold this record with a song that means a great deal to @BoyzIIMen and myself and has touched so many. Keep living your best life! ...

"Thank you for acknowledging this song One Sweet Day will always hold a special place in my heart and I want to thank anyone who's ever told me how this song has affected them and their loved ones. (sic)"

The 20-year-old star replied immediately and hailed the "We Belong Together" hitmaker a "legend and an icon", while he admitted it was surreal getting a message from his idol.

Retweeting Mariah's post, he added: "wowwww thank you so much mariah! you are a legend and an icon and i'm blessed to even have you acknowledging me right now! growing up to your music & now having you talk to me directly is unreal! (sic)"

Lil Nas also penned a poignant post on his Instagram account to mark the milestone.

Punctuated with emojis, he wrote on Instagram: "on december 2nd i went into the studio & recorded OLD TOWN ROAD & put it out the exact same day!! did i know it would become the longest running number 1 song of all time? NO!

"but i am so thankful that this blessing has been placed upon me. this song has changed my life and the way i see the world around me in less than a year. thank you to every single person who has been apart of this journey. as i said before, it's just the beginning! (sic)"

View this post on Instagram

last year in october 🎃 , as a struggling artist 🤦🏾‍♂️starting to lose faith in what i could be, i went looking for beats on youtube👨🏾‍💻. i remember clicking on so many generic sounding beats🥁😞trying to find the right one for me🤔. when suddenly i came across a country-trap 👨🏾‍🌾🏚sounding masterpiece🤩. i immediately knew i would make something special out of it🤯💭⚡️! my sister👩🏽 told me i had little time left ⏳before i had to leave her house 🏠 after being there for months📆 promoting my music🎶 online 🤳🏾and not helping🤷🏾‍♂️ her out much. i was so upset 😔! i used it as motivation for the song🎼! i jokingly/seriously saw myself as a loner 🚶🏾‍♂️ cowboy🤠 needing to 🏃🏾run away from it all🎭! I went out 👟👟 on my sister’s back porch 😶 and listened to the beat 🎧OVER 🔄& OVER 🔄& OVER🔄!! then it came to me😳!! in my best singing voice😮 i sung🎶 “YEAHHH IM GONNA TAKE MY HORSE🐎 TO THE OLD TOWN ROAD 🛣 IM GONNA RIDEEEE TIL I CANT NO MORE 😔😔” I LOVED IT ALREADY! i started to work on it👨🏾‍🎨 👉🏾EVERY SINGLE DAY👈🏾. it needed to be funny🤣, it needed to be catchy🤗🎵, it needed to be hip hop 🗣🔥, it needed to be country🐴🍺, & it needed to be short👌🏾!! by the time i was finished 😅 setting it up 💁🏾‍♂️ i was out of my sister’s crib🏡 and at my brothers 👨🏾‍🦱 place. on ☃️🌬december 2️⃣nd i went into the studio 🎤🎤🎼 & recorded OLD TOWN ROAD🐎🤩✨ & put it out the exact same 🗓day!! did i know it would become the longest running number 1️⃣ song of all time? 🤔NO! ‼️ but i am so thankful🙏🏾 that this blessing ✨ has been placed upon me🤠. this song has changed my life🤩🤩🤩 and the way i see the world🌎🌍around me🙋🏾‍♂️ in less than a year📈. thank you to every single person☝️ who has been apart of this journey🌄. as i said😯 before, it’s just the beginning! 🖤🤠🐎⚡️

A post shared by Lil Nas X (@lilnasx) on

In 2017, Mariah's feat became tied with "Despacito" by Luis Fonsi, Daddy Yankee and Justin Bieber.