Christian rapper TobyMac's son Truett Foster's cause of death has been ruled an accidental drug overdose.

A representative confirmed the news to People magazine, citing fentanyl and amphetamines.

Foster died on Oct. 23, 2019, at the age of 21 after medics responded to a cardiac arrest call to the family's Tennesse home.

Truett Foster McKeehan in a music video titled "Villa Pl. Freestyle." (YouTube)

Truett was an aspiring rapper. He went by the names Truett Foster, TRU, Shiloh and truDog online and collaborated with his father on a few tracks.

In a tribute written by TobyMac, and obtained by Fox News shortly after his son's death, TobyMac said his son "had joy that took the room when he entered."

"He was a magnetic son and brother and friend. If you met him you knew him, you remembered him," TobyMac wrote. "His smile, his laugh, the encouragement he offered with words or even without. He had an untamable grand personality and dreams to match. And he hated being put in a box.

"He expressed himself through the music he made," TobyMac continued. "And by made I mean, written, recorded, produced, mixed, and designed the art. All of it. A true artist. His first show was a week ago, and it was nothing short of electric.

"Everyone felt it, everyone knew it," he recalled. "He could’ve easily taken the easy route and put music out when he was 12, 14, 16, even 18, but he always said he wanted to live some life and have something to say before he did it. He didn’t want to be a child star, he wanted to be a man with scars and a story to tell. I always admired, respected and encouraged that stand."

He added: "Truett always had a soft spot for God. The Bible moved him. His heart was warm to the things of his King. He was by no means a cookie-cutter Christian but give me a believer who fights to keep believing. Give me a broken man who recognizes his need for a Savior every time. That’s who Truett was and how he should be remembered."

TobyMac went on to share his "last moment" in-person with his son, which was the Thursday before his death  at the Factory in Franklin, Tenn.

"I had to leave the next morning very early to fly and start our Canadian tour," he said. "As I stood in the audience and watched my son bring joy to a room, I was as proud as a “pop” (as tru called me) could be. It was the culminating moment of a dream that he had since he was 12.

"It couldn’t have been sweeter. Our music, and what we say lyrically couldn’t be more different, but the outcome was much the same… offering a room full of people a few minutes of joy in a crazy world."

In his tribute, TobyMac also shared the last text message exchange he had with Truett, where he told his son how proud of him he was, to which Truett responded: "love you dad. thank you so much. you have always believed in me. make me feel like a superhero."

TobyMac concluded his tribute by saying that he and his wife, Amanda -- with whom he also shares children, twins Moses and Marlee, Leo, and Judah -- "would want the world to know" the following.

"We don’t follow God because we have some sort of under the table deal with Him, like we’ll follow you if you bless us. We follow God because we love Him. It’s our honor."

Fox News' Jessica Napoli, Sasha Savitsky and Mariah Haas contributed to this report.