Lil Nas X writes a letter to his younger self about coming out

IMAGE: Lil Nas X arrives at the American Music Awards in 2019. (Jordan Strauss / Invision / AP file)

Rapper Lil Nas X wrote a letter to himself about coming out publicly as gay.

The "Old Town Road" performer addressed the note to "14-year-old Montero," using his given name, Montero Lamar Hill. "I wrote a song with our name in it. It's about a guy I met last summer," he wrote.

"I know we promised to never come out publicly, I know we promised to never be ‘that’ type of gay person, I know we promised to die with the secret, but this will open doors for many other queer people to simply exist," he continued.

He added that coming out was difficult for him, and people accused him of "pushing an agenda."

Fans rallied around him in response, thanking him for being open about who he is and helping future generations feel comfortable doing the same.

"As someone who didn’t come out even to myself until I was just about grown, I’m so proud of you," one fan wrote.

In a follow-up tweet, Lil Nas X shared a link to his new single, "Montero (Call Me By Your Name)," with a music video that Rolling Stone described as "unabashedly queer."

"In life, we hide the parts of ourselves we don't want the world to see," he says in a voiceover at the start of the video. "We lock them away. We tell them, 'No.' We banish them. But here, we don't. Welcome to Montero."

Lil Nas X first appeared to come out in a tweet in June 2019, on the last day of Pride Month. He pointed out a rainbow building on the cover of his album, "C7osure," and said, “Deada-- thought I made it obvious."

The rapper said he didn't always plan to come out, according to an August 2019 interview with Time. He said he was raised to believe that homosexuality "is never going to be OK," and he was afraid he would alienate fans.

“I know the people who listen to this the most, and they’re not accepting of homosexuality,” he said at the time.

Then, during Pride Month, he changed his mind. “I never would have done that if I wasn’t in a way pushed by the universe,” he said. “In June, I’m seeing Pride flags everywhere and seeing couples holding hands — little stuff like that.”

After coming out, he faced some bullying on social media, and other celebrities voiced their support.

Dwyane Wade — whose 13-year-old daughter, Zaya, is transgender — told the rapper to "focus on all the good in your life" in a comment on Instagram. "Don't allow these fools get to you. It's a lot of us out here proud of who and what you represent."

Lil Nas X rose to fame after Billboard removed his song "Old Town Road" from the Hot Country chart after it debuted at No. 19 in March 2019.

In response, country singer Billy Ray Cyrus joined him on a remix of the song, which became the longest-leading No. 1 single in Hot 100 history, remaining at the top for 19 weeks, according to Billboard.

Follow NBC Out on Twitter, Facebook & Instagram