GALVESTON, Texas – A necropsy, an animal autopsy, is being performed Wednesday morning on a stranded whale found on a Galveston beach. The 45-foot long marine mammal was struggling in the water Tuesday morning. Rescuers attempted to save the whale, but it died.

The Texas Marine Mammal Stranding Network believes whatever the whale was suffering from caused the animal to lose its way and drift toward Galveston.

The mammal was stuck near FM 3005, close to the Terramar subdivision. Rescue crews said they are unsure how long the whale was stranded but they received a call around 7:30 a.m. Tuesday.

Shortly after noon, Heidi Whitehead with the Texas Marine Mammal Stranding Network, said the whale stopped breathing and passed away.

"We're here to make them more comfortable. So if an animal needs to be euthanized, that's what we'll do. If an animal dies, then likely it was very close to death coming to shore already," Whitehead said.

[WATCH RAW VIDEO]

A marine biologist told KPRC 2 that the mammal is possibly a sei whale. Officials are trying to determine what caused it to become stuck, but they said that sick or injured whales can become stranded on beaches.

"It typically is because they are not able to survive in deeper water so they are weak or impaired in some way. So, nine times out of 10, they come ashore because they are sick or injured," Whitehead said.

"I've lived here my whole life. I'm 53 years old and I've never seen a whale on the beach," Kevin Harrington, of Galveston, said.

"It's something close to religious. It something you don't see all the time," Miguel Gonzalez said. "We actually came (down) from Houston."

As sad as a sight it is for many, for Gonzalez this was also a teaching moment for his children.

"Big circle of life and we need to be responsible with our trash so animals like this don't get sick," Gonzalez said.

Early Tuesday afternoon, the whale was pulled onto the beach by two front-end loaders.

Whitehead said the whale will undergo a necropsy on Wednesday.

Sheriff's deputies are keeping watch over the whale overnight. Marine biologists will be out at first light to begin the work of trying to find out what led to the whale's death.

Click here for more information about the Texas Marine Mammal Stranding Network.