A Florida man nearly drowned while trying to rescue his dog after it jumped into a lake while the family was trying to take a photo at a park, officials said.

>> Read more trending news

Mark Payne, 33, was with his wife, Ashley Payne, 30, and his mother-in-law, Roberta Sharman, 48, at a Walsingham Park getting ready to take a family photo when one of the dogs that was going to pose with them ran into a nearby lake, the Pinellas County Sheriff's Office said.

The dog, a pit bull mix named Luke, was on a leash when he pulled away and jumped into the lake, WFTS reported.

The family was worried about alligators, so Mark Payne went in after Luke. Because of the steel-toed boots he was wearing, Payne struggled to swim and went underwater, WFTS reported.

Sharman and some good Samaritans went into the lake and brought Payne to shore.

Paramedics treated Payne at the scene. He had a pulse and was breathing when rescuers took him to a hospital with life-threatening injuries. Luke was not injured, WFTS reported.

The couple was married at the park and comes back to the same spot each year to take a portrait, WFTS reported.