Jimmy Buffett privately fought a lengthy health battle prior to his death.

The legendary musician, best known for his single "Margaritaville," passed away Sept. 1 at age 76 at his home in Sag Harbor, Long Island, while surrounded by family and friends. Before he died, Buffett fought Merkel Cell Skin Cancer for four years, according to an obituary posted on his website.

But the singer-songwriter did not let his illness stop him from doing what he loved. "He continued to perform during treatment," the website stated, "playing his last show, a surprise appearance in Rhode Island, in early July."

Less than two months after he was hospitalized for what he described on X (formerly known as Twitter) as "issues that needed immediate attention," the star had joined country singer Mac McAnally, a member of his backing group The Coral Reefer Band, onstage at his outdoor show at the Sunset Cove waterfront bar July 2.

As seen in a video shared on the venue's Instagram, Buffett casually walked out onstage as McAnally performed a cover of the music legend and Alan Jackson's 2003 hit "It's Five O'Clock Somewhere," after singing the lyric, "At a moment like this, you can't help but wonder what would Jimmy Buffett do?" The crowd erupted in cheers and gave him a standing ovation.

"I would come play for you," Buffett told the audience after taking hold of a mic, then grabbed a guitar and joined McAnally to finish the song.

The two then performed several other songs together, including "Cheeseburger in Paradise," "A Pirate Looks at Forty" and "Come Monday" before ending their joint set with "Margaritaville."

Following news of his death, many fellow iconic musicians, such as Paul McCartney, Elton John and Jon Bon Jovi, paid homage to him on social media. Read their tributes here.

For the latest breaking news updates, click here to download the E! News App

Disclaimer: The copyright of this article belongs to the original author. Reposting this article is solely for the purpose of information dissemination and does not constitute any investment advice. If there is any infringement, please contact us immediately. We will make corrections or deletions as necessary. Thank you.