A high school volleyball player who returned to the court in May after cancer forced him to have his right arm amputated, died on Tuesday.

Eduard Nogay, a student at Fort Hamilton High School in Brooklyn, had been at Memorial Sloan-Kettering Cancer Center since May 19, the New York Daily News reports. On May 7, the one-armed volleyball player had inspired his teammates to a playoff victory.

Nogay died shortly after midnight, with three best friends, volleyball coaches and his family at his side, the Daily News reports. “It was a beautiful but devastating moment,” Fort Hamilton volleyball coach Kim Tolve told the paper.

The teenager had celebrated his 18th birthday on Monday, and a party had been planned for him at 7 p.m., the Daily News reports. But around 6 p.m., Nogay began to have trouble breathing. The birthday party had to be canceled, but Nogay managed to say goodbye to the 30 students who came to visit him before his passing.

“It was storybook,” Denis Dikarev, one of the three friends who were at Nogay’s side when he died, told the Daily News. “After it hit 12 o’clock — he made a promise to his brother to wait until his birthday finishes. Right when it hit 12 o’clock, that’s when it happened. I really feel like he wanted it this way."

A native of Uzbekistan, Nogay immigrated to the United States in 1999. In 2012, a biopsy revealed that a lump found on the volleyball player’s right elbow—once thought to be benign—was a sarcoma. After radiation and chemotherapy failed to contain the cancer, Nogay and his doctors decided to amputate most of his arm last Halloween.

In April, Nogay’s condition worsened. A pair of collapsed lungs forced doctors to insert tubes into each of the student’s lungs. Still, the one-armed volleyball player refused to let the sarcoma keep him off the court. Nogay returned to action long enough to lead Fort Hamilton to a 2-1 playoff victory over Christopher Columbus High School.