A cause of death for Tyler Sanders, the teen actor from programs like "9-1-1: Lone Star" and "Just Add Magic: Mystery City," has been revealed.

Fox News Digital can confirm that Sanders died from fentanyl effects. The Los Angeles County Medical Examiner determined that it was accidental.

The actor was just 18 years old when he was discovered dead in his home.

At the time, an investigation was opened into his sudden death.

STARS WE'VE LOST IN 2022

Tyler Sanders stares down at the camera in an apparent selfie with his brown hair floppy and parted in the middle

Tyler Sanders' death was ruled an accident by the Los Angeles County Medical Examiner. (Instagram)

'9-1-1: LONE STAR' ACTOR TYLER SANDERS DEAD AT 18

Sanders got his start with roles on "Fear the Walking Dead," "Just Add Magic" and "The Rookie."

He was also nominated for a Daytime Emmy for his role in "Just Add Magic: Mystery City."

Sanders' representative Pedro Tapia previously told Fox News Digital, "Tyler was a talented actor with a bright future," and that he came from a "wonderful family."

Rob Lowe, who starred alongside Sanders on "9-1-1," also told Fox News Digital, "I’m saddened to hear about the passing of Tyler Sanders. He was a wonderful actor to work with on '9-1-1: Lone Star' and will be missed. My thoughts go out to his family during this difficult time."

Tyler Sanders in a black hoodie at a table outside

Tyler Sanders seemed to follow a regimented fitness routine, according to his Instagram. (Instagram)

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

According to his Instagram, the young actor was interested in fitness and posted multiple photos and videos of his physical journey.

Sanders is not the first star to be taken too soon by fentanyl. 

Luke Bell in a denim shirt and cowboy hat playing on stage split Prince on stage in blue split Mac Miller on stage in a printed shirt

Star musicians including Luke Bell, Prince and Mac Miller all died with fentanyl in their system. (Rick Diamond/Kevin Winter/Mauricio Santana )

Just four months ago, country musician Luke Bell was revealed to have died from a fentanyl overdose at age 32. 

This past May, a second drug dealer was sentenced to time in prison for the role he played in distributing fentanyl that led to the death of rapper Mac Miller in 2018.

And when Prince passed away in 2016, it was revealed that he had a very high level of fentanyl in his system, which directly caused his death. 

CLICK HERE TO GET THE FOX NEWS APP