PANAMA CITY BEACH, Fla. (WMBB) — A human chain helped rescue four Bay County Sheriff’s deputies on Wednesday after a water rescue.

Law enforcement responded to help three distressed swimmers, but after that, they found themselves in a scary situation.

“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,” said BCSO Captain, David Baldwin.

Baldwin said four deputies went into the water to help the swimmers.

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 assist.

“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.

Georgia resident and beachgoer, Jimmy Gaylor, 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.

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

Violators of the double red flag law can face a $500 fine or even arrest.