REDINGTON BEACH, Fla. — Crews worked to rescue five whales in distress in the Gulf of Mexico.

Deputies from Florida Fish and Wildlife and officials from the Clearwater Marine Aquarium were on the shore of Redington Beach where the whales were stranded close to shore Monday morning.

Tents were placed over the whales to try and keep them cool. Three of the whales were sent back out into the Gulf, and will be followed with satellite tags. The other two are being brought to a rehab facility in Tarpon Springs.

Laura Engleby of National Oceanic Atmospheric Administration said when offshore species like pilot whales get into shallow water, they tend to get disoriented.

"It's hard for them to find their way out," Engleby said of the distressed whales.

Engleby said the ideal situation is to get the whales as deep in the water as they can but added there are limitations.

"We're doing what we can," Engleby said.

Engleby said NOAA does not know about the whales' chances of a "happy ending."

Large crowds gathered along the beach to watch the rescue efforts.

"It's monumental," said Vinny Goncalves. "We're really hoping they pull through and make it."

Goncalves brought his family from Largo, calling the marine emergency as a great teaching opportunity.

"We decided to drive out and see if there was anything we could do to help."

Crews successfully released three of the whales about 10 miles off the coast, back into their natural, deep-water habitat.

Experts called the massive rescue a "herculean effort" by volunteers and the community.

“This amazing community has been coming together bringing towels and water and food and being so supportive of everyone here," said Engleby.

Watch Live Coverage on ABC Action News Streaming Now for live updates throughout the day.