Officials say a West Point cadet has died after trying to save a swimmer caught in a rip current off a Long Island beach.

U.S. Military Academy spokesman Lt. Col. Christopher Kasker on Friday confirmed Thomas Surdyke's death. The 18-year-old cadet from Festus, Missouri, had been on life support after the June 24 rescue attempt.

Southampton officials said witnesses told them Surdyke saw someone struggling in the water, rushed to help and went under himself.

Officials say the other swimmer survived.

Surdyke was entering his second year at the military academy. He would have turned 19 on July Fourth.

His grandfather, Gary Surdyke, described him as someone "with character, integrity and faith," NBC's St. Louis affiliate KSDK reported.