A Twist of Sand
(1968)

Geoffrey Peace (Richard Johnson) is a former British WWII navy officer, now working as a smuggler in the Mediterranean.  He dumps his cargo when pursued by the authorities. Harry Riker (Jeremy Kemp) assigns him a dangerous mission to smuggle diamonds out of Africa.  This will require him to navigate the the dangerous waters of the skeleton coast.

Peace is hesitant to go there. During the war, he commanded a vessel that intercepted an experimental nazi submarine.  He was ordered to destroy the submarine, and kill all its crew.  He burned the submarine with the crew aboard.  He does not want this to come out.

They cross the skeleton coast, and find the burned hulk of the submarine. Riker reveals he heard about Peace killing that crew, and purposely forced Peace to take them there to confirm it.  Johann turns out to be a survivor of the burnt submarine.

After many obstacles, they find the diamonds.  Riker causes a cave in to kill Peace's buddy David.  Johann is injured, and Riker wants to leave him to die.  Peace insists on carrying Johann back to their ship, possibly to atone for his war actions.  Riker wants to kill Johann.  In the struggle, Riker and Johann both die.  The bag with diamonds falls into the water and is lost.  Only Riker and Julie survive.  

Thanks Joseph C!