PORT ST. LUCIE (CBSMiami/AP) — A driverless boat spun in several circles before slamming into a dock in the St. Lucie River.

The three people who had been in the 24-foot boat said they doing a photoshoot on Saturday when they accidentally fell overboard.

The boat circled around the men numerous times, forcing them to dive underwater so it wouldn’t run them over.

The boat then straightened out, hit a concrete dock, went airborne, and hit a second dock before coming to a stop, the Martin County Sheriff’s Office said in a Facebook post.

The men were able to swim to a nearby sailboat. One had a minor injury, the sheriff’s office said.

An investigation into the cause has been turned over to the Florida Fish and Wildlife Conservation Commission.

(© Copyright 2020 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)