"American Idol" alum C.J. Harris' cause of death has been revealed. The 31-year-old died of a heart attack, a spokesperson for the Walker County Coroner's Office confirmed to Fox News Digital on Thursday.

Deputy coroner Danielle Calloway said that the singer died on Sunday night after being rushed to the Walker Baptist Medical Center in Jasper, Alabama.

Calloway told Fox News Digital that doctors performed CPR on Harris at the hospital, but the efforts were unsuccessful. He was pronounced dead due to a heart attack. 

Harris competed on the 13th season of "American Idol" and finished in sixth place. Caleb Johnson went on to win the reality TV competition series, which aired in 2014.

c.j. harris american idol

"American Idol" alum C.J. Harris' cause of death has been revealed. The 31-year-old died of a heart attack, a spokesperson for the Walker County Coroner's Office confirmed to Fox News Digital on Thursday. (FOX Image Collection via Getty Images / File)

CJ HARRIS, FORMER ‘AMERICAN IDOL’ CONTESTANT, DEAD AT 31

Following his "Idol" debut, Harris released his debut single, "In Love," in 2019.

After news of the musician's death broke, the "American Idol" team shared heartfelt condolences on Twitter.

"C.J. Harris was an incredible talent, and the news of his passing deeply saddens us," they wrote. "He will be truly missed."

Sam Woolf, who came in fifth place on the show, remembered competing with Harris as he paid tribute to the late singer.

"Cj was such a genuine and loving person," he wrote on Instagram. "We became close friends during the show and were roommates on the tour."

He added, "I’m very grateful to have gone through that incredible experience with him alongside Caleb and Alex. My thoughts go out to his family. Rest easy my dude."

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

Alex Preston, who came in third place, shared a photo with Harris, Woolf and Johnson standing outside by a tour bus.

He wrote: "RIP CJ. I cant believe this, I woke up and thought it was a dream. I love you dude. I’ll always remember the good times we all had."

Johnson remembered being roommates with Harris during "Hollywood Week" and forming a brotherhood pack with Preston and Woolf.

"So many amazing memories and experiences with you CJ! Life is so fragile! I am so grateful that our lives got to cross paths in this lifetime," Johnson added. "You were a beautiful, kind soul that always made the room brighter with your smile and laughter. Love you brother."

Jess Meuse, who finished in fourth place, posted a photo of herself with Harris on Instagram, writing, "My heart is heavy to hear of the passing of fellow @americanidol and friend @cjharrismusic."

She continued, "I’m completely shocked. Your talent and smile will be missed, and the world is definitely a darker and eerily quieter place without you in it. I’ll miss your random phone calls asking for life advice and talking about the music world."

"When you go through something like Idol together, it brings everyone involved together like a big, weird, dysfunctional family. I’m grateful that our paths crossed and that I can say you were (and always will be) a part of mine."

"There are a lot of things I realize I will never understand — you leaving us so soon is one of those things. Rest easy, friend. See you on the other side."

CLICK HERE TO GET THE FOX NEWS APP

Fox News Digital's Tracy Wright contributed to this story.