PANAMA CITY BEACH, Fla. (WMBB) — A group of people formed a human chain on Wednesday to help rescue four sheriff’s deputies in Bay County, Florida, who got into trouble in the water after helping three swimmers in distress.

“The initial response for the swimmers in distress, they were able to get the swimmers out and then at that point it was getting themselves out as well,” Sheriff’s Capt. David Baldwin said.

Four deputies went into the water to help the swimmers, Baldwin said. Three were able to get out, but the fourth, a sergeant, was stuck in the current yelling for help. That’s when the other deputies got back in the water to help him.

“It just shows the danger that our personnel go into to, one, rescue and save the civilians, but then again, save themselves because we’re human too,” Baldwin said. “We’re trained to handle that type of water, but you can’t sometimes fight against mother nature. She will win when you try to fight against her.”

A fifth deputy got in the water to help. Baldwin said beachgoers followed and formed the human chain. He said the deputy didn’t intend for that to happen.

“So we don’t encourage that, but what we would say is thank you to the personnel and the citizens that showed up to help that deputy because they were in fact able to help those last three get out and then finally our sergeant who was the very last to come out as well,” Baldwin said.

Jimmy Gaylor a Georgia resident and beachgoer, said he’s only seen a human chain one other time in his life.

“When it started, we were actually up in the condo whenever they started getting, you know, pulled out, and we came down, and by the time we came down, that’s when they were doing the human chain,” Gaylor said.

Gaylor said at first the Gulf seemed fine, but then things changed right before their eyes.

“Just all of a sudden you saw the actual tide change and it started going back out, and if people are not aware of that, it’s easy to get caught up in it,” Gaylor said.

Baldwin said people can come here and have a safe vacation. However, he said it is important to learn the flag system. When double red flags are flying, stay out of the water, he said.

Those who violate the double red flag law can face a $500 fine or even arrest.