The close encounter was caught on camera.
The men said they were spearfishing off Anacapa Island when they spotted an 8-foot hammerhead shark in the water.
They turned on the camera, put bait in the water and jumped in.
After a few minutes, the men got back on the boat.
Experts say hammerhead shark attacks and sightings are rare, but we're seeing more of them thanks to a developing El Nino.
As for the fishermen, the shark didn't scare them away. They say they'll dive in again.