On a summer day in July 1945, the USS Indianapolis delivered components for two atomic bombs to a U.S. Army base in the Pacific Ocean.

Just days before the bombs would be used to help end World War II, the USS Indianapolis was torpedoed by a Japanese submarine. It sank in 12 minutes, taking about 300 American officers and crew members with it and leaving around 880 to fend for themselves in the deep Pacific.

Edgar Harrell, a Marine who was on board the USS Indianapolis, was one of only 317 to survive.

The now 90-year-old Kentucky native recently published a book, "Out of the Depths" (Bethany House, $16.99), describing his experience in what he called the "greatest tragedy at sea in the history of the U.S. Navy."

Harrell attributed his survival entirely to "the good Lord."

"I look up to heaven today and just say, 'Thank you, Lord,’ ” he said in an interview with the Deseret News. "Without the providence and higher power, I never would have made it."

Harrell, who currently lives in Tennessee, remembers the night very clearly. He and his fellow soldiers were sleeping on the open deck because it was too hot to sleep in the cabin.

About 14 minutes after midnight, Japanese Capt. Mochitsura Hashimoto fired torpedoes, and they struck the USS Indianapolis. The first one hit the front of the ship and cut the bow off entirely.

"We could see the ship was doomed," Harrell said. "You could hear the bowheads breaking."

He said the captain gave word to abandon ship, and Harrell grabbed a life jacket and jumped into the dark blue ocean.

From the water, he watched the ship turn up on its nose and then disappear into the Pacific.

Harrell said the survivors grouped together the best they could with only life jackets to keep their heads above water. He ended up in a group of about 80 men floating in the ocean.

He knew SOS signals had been sent out before the ship sank, and he expected to be rescued shortly.

"I was wondering if somehow I could endure, not realizing that we were going to be out there for four and a half days," he said.

Somehow, the SOS signals were either not picked up or not responded to. The surviving 880 men spent the next 4½ days fighting for their lives against the unrelenting Pacific Ocean without food, water or life rafts. They faced salt water exposure, dehydration, shark attacks, hallucinations and extreme hunger, thirst and fatigue. Harrell said the water they were swimming in included a mixture of oil and blood.

"Nearly at the point of losing hope, you see a buddy who had been attacked by a shark (and) who is maybe disemboweled, and you think if that's maybe not going to be you soon," he said.

But he said his faith in the Lord and thoughts of his family kept him going.

"I believe that it was the power of God that gave me hope," he said. "I had accepted the Lord as my own personal help and Savior and felt that somehow, some way, I had prayed that I don't want to die. I had a family back home, a mom and dad and six siblings. And a certain brunette who said she would wait for me."

He said others were praying too.

"Everyone was pouring their heart out to the Lord whether they knew him or not," he said. "There was no atheist out there. Everyone prayed."

But by the third day, Harrell had no idea where the other survivors had drifted off to, and only 17 of the 80 men that had been grouped together with him were still alive. He watched many simply give up hope.

By the fourth day, it was just him and one other man for as far as he could see. He said their life jackets had lost most of their buoyancy, and they were sitting on them and paddling to keep afloat.

Late that afternoon, they saw a low-flying plane. The pilot was having some problems with the antenna and happened to open the plane door to fix it just as he was flying over the wreck. From 4,000 feet up, the pilot saw the massive oil spill in the water.

"By the providence of God, he saw the oil slick," Harrell said. He said the pilot flew lower and saw dozens of sharks among the floating men and debris as far as he could see.

Harrell remembers the feelings of immense joy and gratitude he felt when he knew he was being rescued.

"Thank you, Lord. Thank you, Lord," he said, recalling that day. "I was so delighted."

Harrell was finally reunited with his family after the long journey home and months in the hospital. He married the brunette and started a business, but he didn't share the details of his experience with anyone. He said it hurt too much.

However, after 9/11, his son prompted him to write his story and share it with the world. Harrell is one of the 36 of the 317 survivors of the USS Indianapolis still alive today and the only one to write a book about his experience.

His book also discusses the controversy over the ship's captain, Charles Butler McVey III. After the incident, McVey was court-martialed and held responsible for the sinking of the ship for "failing to zig-zag" to avoid enemy ships.

Harrell said he believes McVey was unjustly blamed for the tragedy. Decades after his death, McVey was acquitted.

Harrell said although it was hard, he has forgiven those responsible for the tragedy.

"It's hard to forgive, but I have forgiven," he said. "It doesn't help to feel offended."

He said Capt. Hashimoto's daughter and granddaughter came to the most recent reunion for USS Indianapolis survivors, which are held every year.

Harrell said he embraced the 6-year-old granddaughter and was able to come to terms with her mother, the captain's daughter.

"I told her, 'I want you to know that I love you and I hope that we can build from this day forward,’ ” he said.

He hopes his story can inspire people to have more faith in God and greater respect for U.S. servicemen.

"So many people around the country do not have the proper respect for those who have gone and given their lives and who are in our service today," he said. "Freedom costs. And it cost 880 of my shipmates."

He asks that people offer gratitude and encouragement to servicemen whenever they can.

"I walk around the grocery store and see a serviceman, and I give him a thumbs up," he said.

In addition to his book efforts, Harrell goes around the country and gives speeches to share his story. He said he has received feedback from many people telling him how his story has influenced them for the better.

"That has been a ministry, even for me," he said. "I've strived to live for him since that day."

Email: epalmer@deseretnews.com Twitter: erica_palmer