A normal day at the beach turned into a heroic moment Saturday when a group of strangers formed a human chain that stretched into the ocean to rescue swimmers stuck in a rip current.

Derek Simmons, 26, and his wife, Jessica Simmons, 29, came up with the idea to start the chain when they saw a group of around nine swimmers struggling to stay afloat off the coast of Panama City Beach, Florida.

8 of the most crowded US beaches and where to go instead

Haven't gone on vacation yet? Here's the date to fly

“The only thing that popped into my mind was if you’ve ever watched ants, when one of their babies is in trouble and can’t move, they start making a chain in order to pass them down the line to get them to safety,” Derek Simmons, of Panama City, told ABC News. “That’s the only thing I was thinking of, if we’re arm to arm, we can get them.”

PHOTO: Derek and Jessica Simmons, of Panama City, Florida, are pictured in this undated handout photo. (Derek Simmons ) More

The swimmers, who reportedly included two young boys and a group of adults who swam out to rescue them, were caught in the water around 6:30 p.m., after the beach’s lifeguards had left for the day, according to Simmons.

One of the swimmers, Brittany Monroe, 25, said she and her wife, Tabatha Monroe, 35, were out on their boogie boards and saw the two boys, who were also in the water with boogie boards, in distress.

"We grabbed the kids and tried to start swimming in and it just kept pulling us back," Brittany Monroe said of the current. "The water was really strong [on Saturday] but where we were it wasn’t pulling us. When we got to where the kids were, that's when we realized we were stuck."

Brittany Monroe said she and her wife, who were visiting from Georgia, were soon joined by the elementary-age boys' mother, Roberta Ursrey, grandmother and uncle, who also swam out to help. Brittany Monroe was able to swim far enough in to reach three teenage boys, who brought her to the shore.

"I couldn’t get back in the water. My lungs were full of water and I couldn’t breathe," she said. "Everybody that would come by me, I would holler at them that my wife was out there, kids were out there, that they had to join the chain."

The chain started with a group of around five people.

“A lot of people were like, ‘There’s no way we’re getting in the water, we’re going to get swept out,’ but I guess they just swallowed the pride pill and they just got in,” Simmons said of watching the chain of strangers grow. “It was pretty amazing stuff for it to be different races, different genders, different ages; everybody got together to help.”

PHOTO: A group of strangers linked arms and waded into the ocean to rescue a group of swimmers stranded off the coast of Panama City Beach, Fla., July 8, 2017. (Courtesy Rosalind Beckton) More

Simmons, who described the ocean conditions as normal that day, and his wife were at the end of the chain. They would swim out to the distressed swimmers and pull them back to the chain one by one. The chain was then anchored by people on shore who would pull them back to safety.

“[Jessica and I] are no Olympic swimmers, not even Coast Guard swimmers but just two average people who spend a lot of time in the water,” Simmons said. “Everybody that was involved is a hero in my book.”

The chain eventually grew to around 40 people, according to a police report obtained by ABC News. The report estimates the swimmers were stuck nearly 70 yards away from the shoreline.

PHOTO: A group of strangers linked arms and waded into the ocean to rescue a group of swimmers stranded off the coast of Panama City Beach, Fla., July 8, 2017. (Courtesy Rosalind Beckton) More

"I've never seen anything like it in my entire life," said Ursrey, who was rescued along with her family members. "Without them I wouldn't have my family."

Story continues