St. Simons Island, Georgia (CNN) Rescuers had to bore through fireproof glass and navigate passageways that had become vertical drops to save the final four men aboard a cargo ship that capsized off Georgia's coast, a Coast Guard official said Tuesday.

The rescue effort was completed Monday evening, when a team pulled the last man -- trapped in the engine room -- from the 656-foot Golden Ray that had fallen onto its side after listing heavily in St. Simons Sound.

The team first cut a hole in the ship's hull so they could insert a camera, said Capt. John Reed, commander of Coast Guard Sector Charleston. The hole was widened to provide the trapped men food and water before the team began connecting a series of 3-inch holes until they had an opening large enough to enter the boat and rescue the men, he said.

To save the final crew member stuck in the engine room, the team had to "grind through a glass window that's meant to protect from fire and flames and explosions in an engine room," Reed said. For being trapped without food or water for almost 40 hours, the crewman was in stable condition, he said.

A @USCG Station Brunswick crew successfully transported the final #GoldenRay crewmember to @GlennCountyOES EMS crews for further medical care. #HappeningNow #BreakingNews #BREAKING pic.twitter.com/pGJg2cV4Cy

"It's not always that you end up with a situation like that with such dire circumstances, where people's lives are at risk, and you're able to rescue them," Reed said.

Three of the men were able to walk away from the ship. One required assistance, officials said. Southeast Georgia Health System, which treated the men, declined to release their conditions, citing privacy concerns and the stress the patients endured.

The operation now turns to righting the boat and getting it out of the sound -- no small task, considering it's a 71,000-ton cargo vessel capable of carrying thousands of automobiles. Complicating matters is what officials have described as a minor oil leak that may pose danger to wildlife, including manatees and turtles, in the area.

Tapping and hoping

Twenty of the crew were rescued a few hours after the first call for help went out early Sunday, but four remained missing.

It was ultimately the sound of tapping that led rescuers to the last of the trapped men on the ship, but early attempts to make contact with the South Korean crew members were fruitless.

A salvage team began tapping on the overturned cargo ship Sunday morning. For hours, they were met with silence. Then, sometime overnight, "they got taps back," Reed said.

Rescuers were dropped off via helicopter and drilled a small hole in the ship to communicate with the crew members, Coast Guard Lt. j.g. Phillip VanderWeit said.

As they worked to make the hole large enough to let in food, water and more air, temperatures climbed to 120 degrees outside and even hotter inside the vessel, Reed said.

By 3 p.m. Monday, three of the crew members had been safely rescued, and the fourth was freed a few hours later, Reed said.

When the final crew member exited the boat, rescuers cheered and clapped.

"That is amazing. The best day of my career because you guys did that. Outstanding," Reed told rescuers at the scene.

A distress call

The Golden Ray called for help around 2 a.m. Sunday, VanderWeit said.

South Korea's Foreign Ministry said the ship began listing heavily, about 80 degrees, to its port side before overturning about 80 miles south of Savannah.

Coast Guard crews and port partners respond to a disabled cargo vessel.

Help arrived about two hours after the first call came in, VanderWeit said. The first 20 members of the crew were rescued around 4 and 5 a.m., he said.

Some crew members were hoisted onto helicopters while others were lowered -- in some cases by fire hoses -- onto boats, VanderWeit said, but rescue efforts stalled as fires broke out on the cargo ship.

"As smoke and flames began to appear, our crews, along with the Glynn County heavy rescue team, assessed that the situation was too risky to further go inside the vessel to attempt to locate the four individuals who remain missing at this time," Reed said.

The Coast Guard remained on scene throughout the night, and when the boat stabilized Monday rescue efforts resumed.

Rescuers work near the stern of the Golden Ray.

Three of the four crew members who had been trapped were found in the propeller shaft Monday, while the fourth was in the engine room, Reed told reporters.

"The expressions on their faces said it all," VanderWeit said.

The cause of the incident is unknown

Officials are still trying to determine what caused the ship to overturn.

The vessel, owned by South Korea-based cargo logistics company Hyundai Glovis, had just been unloaded and reloaded at the Port of Brunswick in the hours before it began leaning, a longshorewoman told CNN.

Rescuers extract the final crew member from the Golden Ray.

The loading process went smoothly, and nothing seemed out of the ordinary, she said.

Its next stop was Baltimore, where it was expected to arrive Monday, according to MarineTraffic.com.

Most of the 4,200 cars on board were made in the United States and destined for export, Glovis America chief operating officer Scott Cornell said.

The company follows international maritime regulations on properly securing its cargo during transport, he said, and "there were no extreme circumstances that lead us to believe that our proper handling methods weren't abided to."

Now that everyone is off of the ship, the Coast Guard and other agencies are working to remove the vessel from the sound and investigate the cause of the incident.

The vessel was leaking some oil into the waterway, said Chris Graff, the director of response services for Gallagher Marine Systems, Hyundai Glovis' designated spill management company. He said the oil -- which officials described as a light sheen -- was possibly from hydraulic fuel and from the engine.

"We know that there's manatees in the area, there's turtle nesting areas in the area, there's some bird activity in the area. All of these are concerns for us," he said.

Smoke billows from the Golden Ray after it overturned in St. Simons Sound.

As a precaution, Coastal Georgia Public Health issued a swimming advisory for St. Simons and Jekyll Island beaches. They announced Sunday that the Georgia Department of Natural Resources would conduct water quality sampling to ensure the safety of shellfish harvesting beds and swimming beaches.

The National Transportation Safety Board is assisting the Coast Guard in its investigation. Because of the agency's maritime investigation expertise, NTSB investigators will likely help examine the vessel and gather physical evidence from the ship, NTSB spokesman Keith Holloway said.

CORRECTION: An earlier version of this story misstated the size of the cargo ship. It is 71,000 tons.