Rapper Mac Miller was found dead on Friday of an apparent overdose, Variety has confirmed. He was 26.

He was found in his Studio City, Calif., home at about noon. His family released a statement about his death on Friday afternoon.

“Malcolm McCormick, known and adored by fans as Mac Miller, has tragically passed away at the age of 26,” reads the statement. “He was a bright light in this world for his family, friends, and fans.”

Miller had struggled with substance abuse in the past. Just last month, the Los Angeles Attorney’s Office officially charged the rapper with a DUI stemming from a car accident in May in the San Fernando Valley.

He had been open about his struggles previously, referencing drug abuse and death in his music, particularly in the deeply personal 2014 mixtape “Faces.” “I used to rap super openly about really dark s—,” he told Vulture in a profile that published on Thursday. “That’s what I was experiencing at the time. That’s fine, that’s good, that’s life. It should be all the emotions.”

Miller had been in a long-term relationship with Ariana Grande, which ended this past May. Shortly after his car accident and arrest that same month, Grande tweeted “pls take care of yourself.”

When discussing their breakup, Grande made it clear addiction was part of the reason for their split. “I am not a babysitter or a mother and no woman should feel that they need to be,” she wrote on Twitter. “I have cared for him and tried to support his sobriety and prayed for his balance for years (and always will of course) but shaming/blaming women for a man’s inability to keep his s— together is a very major problem.”

Miller had just been preparing to embark on a U.S. tour after releasing his most recent album, “Swimming,” on Aug. 3. It was set to kick off on Oct. 27 in San Francisco.

“I just wanna go on tour,” he tweeted on Thursday. “The show is going to be special every night. I wish it started tomorrow.”

“Swimming” debuted at No. 3 on the Billboard 200, supported by singles “Small Worlds,” “Self Care,” and “What’s the Use?” In “Self Care,” he references his DUI and arrest, rapping, “That Mercedes drove me crazy, I was speedin’ / Somebody save me from myself, yeah / Tell them they can take that bullsh– elsewhere / Self care, we gonna be good / Hell yeah, they lettin’ me go.”

In the music video for the single, he also uses a knife to carve the words “Memento mori” — “remember you have to die” in Latin — into the lid of the coffin.

Aside from his music, Miller’s reality show “Mac Miller and the Most Dope Family” ran for two seasons on MTV2. He also appeared in 2013’s “Scary Movie 5” in a small role alongside Snoop Dogg.

Miller, a Pittsburgh native, decided to focus on hip-hop when he was in high school. In 2007, when he was just 15, he released the mixtape “But My Mackin’ Ain’t Easy” under the name EZ Mac. In the following couple of years, he released two solo mixtapes, “The Jukebox: Prelude to Class Clown” and “The High Life,” in addition to one with rap group the Ill Spoken. He signed a deal with indie record label Rostrum Records in 2010.

The rapper led his 2011 mixtape, “Best Day Ever,” with the single “Donald Trump,” which marked the first time Miller hit the Billboard 100. It focused on Miller’s ambitions to become as financially successful as Trump, and resurfaced in popularity when Trump hit the presidential campaign trial in 2016. Miller, however, has since said that he was not a political supporter of Trump, describing him as “an egomaniacal, attention-thirsty, psychopathic, power-hungry, delusional waste of skin and bones” during the campaign, and sparking a Twitter war.

His first studio album, “Blue Slide Park,” came in 2011, led by the single “Frick Park Market.” It debuted at No. 1 on the Billboard album chart, becoming the first independently released debut album to do so since 1995.

He released “Watching Movies With the Sound Off,” his second album, in 2013. It was largely produced by himself, under the pseudonym Larry Fisherman, and featured guest appearances such as Schoolboy Q, Action Bronson, and Tyler, the Creator. Critics handed better reviews to his sophomore album, which debuted at No. 3 on the Billboard 200. That same year, an appearance on Grande’s single “The Way” notched Miller his first Top 10 single, and he continued to develop as a producer, releasing the largely instrumental collection “Run-On Sentences Vol. 2” and producing a mixtape for Vince Staples.

In 2014, Miller left Rostrum and, after independently releasing “Faces,” he revealed that his label Remember Music had signed a deal with Warner Bros. Records for a reported $10 million. Tom Corson, co-chairman and COO of Warner Bros. Records, released a statement about his death on Friday afternoon.

“All of us at Warner Bros. Records are deeply shocked and saddened by the tragic news of Mac Miller’s untimely passing,” reads the statement. “Mac was a hugely gifted and inspiring artist, with a pioneering spirit and a sense of humor that touched everyone he met. Mac’s death is a devastating loss and cuts short a life and a talent of huge potential, where the possibilities felt limitless. We join all of his fans across the globe in extending our thoughts and prayers to his family and friends.”

Miller released his third album, “GO:OD AM,” in 2015, with the two singles, “100 Grandkids” and “Weekend.” “The Divine Feminine,” his fourth studio album, came the following year, featuring guest appearances from Grande, Kendrick Lamar, Anderson Paak, and Ty Dolla Sign.

As Miller’s profile rose, though, he appeared in more tabloid headlines. In addition to his legal troubles — which, along with the DUI, included a 2012 lawsuit from producer Lord Finesse that was eventually settled out of court — his relationship and eventual breakup with Grande stayed in the news. In his Vulture profile, Miller opened up about how he approaches his public image.

“It just seems exhausting to always be battling something … to always be battling for what you think your image is supposed to be,” he said. “You’re never going to be able to get anything across. It’s never gonna be the real … No one’s gonna ever really know me.”