Zach Sobiech, a terminally ill Minnesota teenager who touched the hearts of millions of people with a farewell song he wrote to his family and friends, died Monday morning.

When he was told that a rare form of bone cancer had left him with only a few months to live, the Stillwater High School senior wrote a song titled “Clouds” in which he said goodbye to the people around him. “Maybe someday I’ll see you again,” he sang. “We’ll fly up in the clouds and we’ll never see the end.”

Originally recorded on Sobiech’s cellphone, the song caught the attention of professional musicians who helped him record a studio version. It became a sensation, attracting more than 2.9 million YouTube views and making Sobiech an international media celebrity, with stories about him appearing everywhere from Billboard magazine to the United Arab Emirates Press.

His death was announced on his CaringBridge Web page in a simple statement saying, “He was surrounded by his sisters, brother, parents and girlfriend. We love him dearly.”

The Sobiechs later said, “Our family has been blessed not only by his amazing presence in our lives, but also by the love and support of our family and friends and by so many people in the community. In particular we’d like to thank those people who listened with their hearts and helped Zach bring his message and his music to the world.”

Sobiech, who turned 18 on May 3, was diagnosed with osteosarcoma in 2009. He underwent multiple surgeries and months of chemotherapy before being told that the cancer had spread to the point that the best that doctors could hope for was to slow the disease’s progression.

Zach Sobiech, who had a rare cancer, wrote a farewell song that became an Internet sensation.

Raising money for research

All of the money generated by his music went to fund research of osteosarcoma, which typically occurs in teens and adolescents. Sales of his CD have raised nearly $100,000 since its release in December, according to the Children’s Cancer Research Fund, with another $10,000 or more expected to come from the royalties from digital download sales.

“His music touched millions, and he leaves a lasting legacy that will help other young cancer patients through the Zach Sobiech Osteosarcoma Fund,” said John Hallberg, CEO of the Children’s Cancer Research Fund. “Zach once said, ‘You don’t have to find out you’re dying to start living.’ He taught us all how to live, and we are all better for having known him.”

In an interview in December, Sobiech, of Lakeland, said that writing the song was his natural reaction when he got the bad medical news.

“There are two ways you can go at a time like that,” he said. “You can cry, or you can talk about it. I’m the type of person who talks about it.”

The comments posted on YouTube underscore the effect “Clouds” has had on listeners. “Your song made me think about the life I’m living,” one admirer wrote. Another said: “If this doesn’t reach your heart, you don’t have one.”

Stillwater High School is working with the family to determine how to acknowledge Sobiech at the June 8 commencement, although he was presented with his diploma last month.

In lieu of flowers, the family has requested that memorials be directed to the research fund.