Miley Cyrus has reached out to DaBaby in the hope they can “learn from each other” amid a backlash against the rapper over crude remarks he made about homosexuality and HIV.

While performing at Miami’s Rolling Loud Festival, the 29-year-old Grammy-nominated performer used crude language and asked attendees who were not gay men or people not affected by HIV or Aids to raise their mobile phone flashlights.

Da Baby, whose real name is Jonathan Kirk, later apologised for his remarks, saying he was misinformed and needed education on these topics, but music festivals, including Lollapalooza, Parklife, Austin City Limits Festival and iHeartRadio, have still cut him from their line-ups.

Cyrus wrote in a post on Instagram: “@DaBaby check your DMS – would love to talk and see how we can learn from each other and help be part of making a more just and understanding future!”

The pop star also tagged resources to provide more information on the topic, including the non-profit Greater Than Aids and the Happy Hippie Foundation, founded by Cyrus in 2014, which focuses on homelessness and LGBTQ rights.

The US singer, 28, also posted a statement to Instagram saying: “As a proud and loyal member of the LGBTQIA+ community, much of my life has been dedicated to encouraging love, acceptance, and open mindedness.

“The internet can fuel a lot of hate and anger and is the nucleus of cancel culture… but I believe it can also be a place filled with education, conversation, communication and connection.

“It’s easier to cancel someone than to find forgiveness and compassion in ourselves or take the time to change hearts and minds. There’s no more room for diversion if we want to keep seeing progress! Knowledge is power! I know I still have so much to learn!”

On Monday DaBaby, whose song Rockstar reached number one in the UK charts last year, apologised for his comments for a second time.

He wrote on Instagram: “Social media moves so fast that people want to demolish you before you even have the opportunity to grow, educate, and learn from your mistakes.

“As a man who has had to make his own way from very difficult circumstances, having people I know publicly working against me — knowing that what I needed was education on these topics and guidance — has been challenging.”

He added he apologises “to the LGBTQ+ community for the hurtful and triggering comments I made”.

His comments were denounced by artists including Madonna and Sir Elton John, while Dua Lipa, who collaborated with DaBaby on the popular remix of her song Levitating, said she was “surprised and horrified”.