Camila Cabello is taking accountability for the 'racist' comments she made on social media in the past.

The pop-star took to social media to issue an apology after the racist comments she made in 2012 when she was a teenager which apparently resurfaced in a thread on Tumblr on Tuesday.

Some of the old posts of the "Havana" singer included gifs, memes, and comments containing the N-word, which is considered derogatory and racist towards the black community.

Apologising for her previous mistakes, the 22-year-old wrote in the caption on Twitter and Instagram stories: "I'm sorry from the bottom of my heart," alongside two detailed messages of her regretting her past online behaviour.

"When I was younger, I used language that I'm deeply ashamed of and will regret forever. I was uneducated and ignorant and once I became aware of the history and the weight and the true meaning behind this horrible and hurtful language, I was deeply embarrassed I ever used it," she wrote in her apology.

Cabello has been accused of using racist language in the past as well, and it was alleged she used the N-word to describe her fellow Fifth Harmony members including Normani. At the time, in 2016, she had issued an indirect apology, not taking Normani's name, reports MTV.

In her latest apology, the Grammy-winner said that she has apologised for her language in the past as well, and would never want to intentionally hurt anyone. She said: " I regret it from the bottom of my heart. As much as I wish I could, I can't go back in time and change things I said in the past. But once you know better, you do better and that's all I can do."

The singer added that she is an adult now and the mistakes she made in the past don't represent the person she is or has ever been.

"I've grown and learned and am conscience and aware of the history and the paint it carries in a way I wasn't before. I only stand and have ever stood for love and inclusivity," the singer continued.

Camila Cabello Stands Up For Dreamers In Heartfelt 2018 Grammys Speech: 'These Kids Can't Be Forgotten'

Calling herself "embarrassingly ignorant and unaware" in the past, Cabello concluded: "I can't say enough how deeply sorry and ashamed I feel, and I apologise again from the bottom of my heart."

On the professional front, she released a new album "Romance" early this month, that she reportedly penned about her boyfriend Shawn Mendes.