Jimmy Buffett's cause of death has been revealed.

The legendary singer had been "fighting Merkel Cell Skin Cancer for four years," according to an official obituary for the star posted to his website. Merkel cell carcinoma is a very rare disease in which malignant (cancer) cells form in the skin, according to the National Cancer Institute. The site states that "sun exposure and having a weak immune system can affect the risk of Merkel cell carcinoma."

The obituary noted that Buffett "continued to perform during treatment, playing his last show, a surprise appearance in Rhode Island, in early July."

LEGENDARY MUSICIAN JIMMY BUFFETT DEAD AT 76: ‘LIVED HIS LIFE LIKE A SONG TILL THE VERY LAST BREATH'

Jimmy Buffett playing guitar on stage

Jimmy Buffett died on Sept. 1 at age 76. (Paul Morigi / Getty Images for Capital Concerts Inc.)

The "Margaritaville" icon died on Sept. 1 at his home in Sag Harbor, Long Island. He was 76 years old.

He died peacefully surrounded by his family, friends, music and dogs, according to a statement posted to his website and social media accounts.

"He lived his life like a song till the very last breath and will be missed beyond measure by so many," the statement reads.

Buffett is survived by his wife of 46 years, Jane Slagsvol, and their three children, Savannah, Sarah and Cameron.

JIMMY BUFFETT'S LIFE IN PHOTOS

Jimmy Buffett and wife Jane Buffett on red carpet

Jimmy Buffett and wife Jane Slagsvol were married for 46 years. (Arturo Holmes / FilmMagic / File)

APP USERS CLICK HERE TO VIEW INSTAGRAM POST

His celebrity friends and fans posted tributes to the singer-songwriter on social media after the news of his death.

Elton John honored Buffett on his social media, writing, "Jimmy Buffett was a unique and treasured entertainer. His fans adored him and he never let them down. This is the saddest of news. A lovely man gone way too soon."

"Condolences to Jane and the family from David and me," he added, referring to Buffett's family

Elton John Jimmy Buffett tribute

Elton John shared his condolences to Buffett's family in a touching tribute on Instagram. (Elton John / Instagram)

ELTON JOHN, BEACH BOYS' BRIAN WILSON LEAD CELEBRITY TRIBUTES TO THE LATE JIMMY BUFFETT: 'UNIQUE AND TREASURED'

Brian Wilson of The Beach Boys shared a simple message that reads, "Love and Mercy" on his X account.

Fellow Beach Boys member Mike Love shared a tribute to the star, recalling a performance with him onstage several years ago.

"Your music brought joy to so many people, including me. It was always a pleasure when our paths crossed and we were able to share the stage together. I will hold dear our time spent together on stage, especially you singing ‘Kokomo’ with us," Love wrote. 

John Stamos shared a clip from a performance of "Kokomo" with Buffett and Love, writing, "Rest well, Jimmy. Thank you for the teaching us all to live life to the fullest. What a loss."

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

Bruce Johnson, Michael Colbert, John Stamos, Mike Love and Jimmy Buffett

From left, Bruce Johnson, Michael Colbert, John Stamos, Mike Love and Jimmy Buffett pose for a photo onstage at the A Capitol Fourth at the U.S. Capitol on July 3, 2018. (Paul Morigi / Getty Images for Capital Concerts Inc.)

Blake Shelton shared a behind-the-scenes memory of working on his series "Barmageddon" with the late icon.

"Heart broken this morning hearing of Jimmy Buffett's passing. What an incredible talent and man. His songs will live on forever. I’ll bet most of y’all don’t know that he wrote the theme song for @BarmageddonUSA for me about 2 years ago. Raising a glass today to the Son of a son of a Sailer."

"Top Gun: Maverick" star Miles Teller shared a quote from Buffett along with a photo of himself and "the legend."

"I can't change the direction of the wind, but I can adjust my sails to always reach my destination," he wrote.

CLICK HERE TO GET THE FOX NEWS APP

Buffett released several pop-culture staples in the 1970s and 1980s, including the 1977 hit "Margaritaville," "Come Monday," "Cheeseburger in Paradise," "Changes in Latitudes, Changes in Attitudes," "A Pirate Looks at Forty" and "Pencil Thin Mustache."

Fox News Digital's Landon Mion and Elizabeth Stanton contributed to this report.