The dramatic moment unfolded at Whytecliff Park in West Vancouver, Canada.
Video showed at least three killer whales zooming through the water at speed.
The camera panned around to reveal their target.
Two swimmers were scrambling out of the water onto rocks to escape the approaching orcas.
One of the whales swam right up to the edge, where the swimmers were standing.
Eventually they carried on swimming past the rocks and back out into the open water.
Experts think the whales probably charged the two men out of curiosity rather than hunger.
California Killer Whale Project researcher Alisa Schulman-Janiger told Buzzfeed: “I just think they were super curious and taking a close look and then on their way.”
The jaw-dropping footage has gone viral since it was shared online.
Uploaded to Instagram by Robin Leveille, the video was captioned: “A whale of a good time here at Whytecliff Park today.”
It has been viewed more than 21,000 times.
One viewer wrote: “I was pretty keen to do some diving around Vancouver, until I saw this video.”
Another shared: “This is amazing!”
CHEAP FLIGHTS AND HOTEL DEALS