An ailing humpback whale that became grounded on a sandbar off New York has been euthanized.

Officials with the Riverhead Foundation of Marine Research and Preservation and others say the whale died Wednesday.

The whale weighed between 15 and 20 tons and got stuck in Long Island's Moriches (moh-RIH'-chihs) Bay on Sunday. Officials say it was about 33 feet long, larger than first estimated.

A veterinary team assessed the whale's condition and found it was thin, limp, weak and minimally responsive. They say it also had neurological abnormalities and possible infections. They euthanized it with injectable medications.

Experts plan a necropsy. They say when whales become stranded it generally indicates underlying health issues.

Humpback whales are common in the region. One recently has been seen swimming in the Hudson River.