PANAMA CITY BEACH, Fla. (WMBB) — A swimmer narrowly avoided an encounter with a hammerhead shark on a Florida Panhandle beach recently.

The video, which has gone viral since it was posted online, was taken in Panama City Beach. It shows the view from above as a hammerhead shark swims directly toward a swimmer. The shark then turns at the last second.

The man was swimming near Splash Resort on Friday morning when it happened.

In the video from Katie Allyson Thomson, people are heard in the background reacting to the close encounter.

“Oh no! No, no, no, no! Oh my God,” someone says. Another person yells for the man to get out of the water.

Watch the video: