Actor Logan Williams, who played a young Barry Allen in the CW’s “The Flash,” died suddenly Thursday at age 16.

No cause of death was given.

The show’s star, Grant Gustin, expressed his anguish on Instagram Friday, posting a photo with Williams and actor Jesse L. Martin taken during the filming of the series pilot in 2014.

“Just hearing the devastating news that Logan Williams has passed away suddenly,” he wrote. “I was so impressed by not only Logan’s talent but his professionalism on set. My thoughts and prayers will be with him and his family during what is I’m sure an unimaginably difficult time for them. Please keep Logan and his family in your thoughts and prayers during what has been a strange and trying time for us all. Sending love to everyone.”

His agent, Michelle Gauvin of Performers Management in Vancouver, British Columbia, provided a statement to The Post:

“We are in shock and mourning this tragic loss. Logan was an exceptional talent, with a kind heart, and an infectious spirit,” she said. “We will all miss him tremendously. Our thoughts and prayers are with his family and loved ones.”

John Wesley Shipp — who played Barry Allen in CBS’ 1990-1991 version of “The Flash” and the character’s father, Henry, in the newer CW drama — said he was “heartsick” in his own condolences via Twitter.

“He was 100% committed to playing young Barry Allen, and we missed him once we moved past that part of the story,” Shipp wrote. “Love and compassion to Logan’s family and friends in your grief.”

According to a report in the Coquitlam, British Columbia-based Tri-City News, the young Canadian actor’s mother, Marlyse Williams, is “absolutely devastated” by his passing, and his family cannot even grieve together because of mandatory social distancing during the coronavirus pandemic.

“I am not able to hug my parents who lost their only grandchild,” Marlyse Williams told the publication.

“With his talent and gorgeous looks, Logan had the potential to be a huge star,” Williams’ mother added. Tri-City News says he is also survived by his father, Clive, as well as grandparents, aunts and uncles.

Williams also had roles in the Hallmark Channel series “When Calls the Heart” and the CW’s “Supernatural.” Erin Krakow, who stars in the Hallmark series, said she was “heartbroken” by the news in a post on Twitter.

“Logan was a beautiful, warm, silly, and talented young man,” Krakow added in a separate tweet. “He could always make us laugh. He was just shy of 17 and had what I’m sure would have been a very bright future ahead of him.”