Silvio Horta, creator of ABC’s popular series “Ugly Betty,” was found dead in a Miami motel room on Tuesday in an apparent suicide. He was 45.

According to the Miami-Dade County Medical Examiner, Horta died of a self-inflicted gunshot wound. A representative for Horta confirmed his death, but declined to comment on the nature of it. His autopsy and toxicology reports have not been completed yet.

The American version of “Ugly Betty,” which starred America Ferrera, ran for four seasons on ABC from 2006 to 2010 and was adapted from the hit Colombian telenovela “Yo soy Betty, la fea.” Horta served as showrunner and head writer on the comedy-drama.

Ferrera posted on Instagram about his death, saying “His talent and creativity brought me and so many others such joy and light.”

The show centered on Betty Suarez, a young, smart Mexican American woman from Queens who lands a job at an upscale fashion magazine in Manhattan. During its run, the show won two Golden Globes, one for best comedy series and one for Ferrera. The original series was created in 1999 by Fernando Gaitan and ran until 2001.

Horta’s family released a statement saying that he “had an ongoing struggle with addiction and depression,” and describing him as a “kind and beautiful man.”

“It is with great sadness that we announce the passing of our dear brother and son, Silvio Horta. Through his friendships, his love and his work in TV and films, Silvio touched the lives of millions. Silvio had an ongoing struggle with addiction and depression, but through it all, he always found a way to turn his struggle into laughter. He was a kind and beautiful man. He may be gone but his light will shine on,” said Horta’s mother, Anna, and sister, Hilda in a joint statement.

Horta, who was born in Miami to Cuban parents and majored in film at NYU, had a project with Mary J. Blige in development at Fox in 2018. The prospective series, titled “Move,” was inspired by the life of famed choreographer and creative director Laurieann Gibson, who created routines for the likes of Beyonce, Michael Jackson, Alicia Keys and Lady Gaga.

His big break came in 1998 when he wrote the screenplay for horror-thriller “Urban Legend.” The script was turned into a successful feature starring Jared Leto and “Dune” star Alicia Witt.

Horta’s moved into TV in the earlly 2000s with the Sci Fi series “The Chronicle,” which ran for a single season and starred Octavia Spencer, among others. In 2003, Horta continued his science fiction run with the UPN series “Jake 2.0.” The series, which also only lasted one season, revolved around a computer expert (Christopher Graham) who, while working for the NSA, was accidentally infected by nanobots, giving him superhuman powers.

Horta’s most recent credit was for writing the 2015 TV movie “The Curse of the Fuentes Women.”

A service for Horta will be held in Miami, with a memorial service to be announced in Los Angeles.