A father vacationing with family in the Florida Panhandle over the weekend died while trying to rescue his three children from a rip current in the Gulf of Mexico.

Pete Rosengren, a Chicago-area newspaper executive, was 42.

The man had driven to Florida from Batavia, Illinois, with his wife, Maura, and his three sons — Gavin, 14, Charlie, 12, and Grant, 7 — and three other families.

The group arrived at the beach Sunday just a few minutes before tragedy struck, according to ABC7 in Chicago.

The children “ran into the water right away” despite a double red flag warning which indicates dangerous water conditions, Maura Rosengren told the Daily Herald, where her husband was employed.

The siblings and another 9-year-old child immediately became trapped in the current and were visibly struggling not to be pulled out to sea.

Seeing the kids in distress, Pete Rosengren ran into the water to save them, according to the Herald, citing a report by the South Walton Fire District.

The children banded together to help each other swim back to shore but the 9-year-old fell behind, reports said.

“It all happened so fast. I ran toward the water,” Maura Rosengren said. “We could see one little boy couldn’t get in and ... (Pete) went out there,” she said.

Pete Rosengren, a lifelong Cubs fan, managed to reach the 9-year-old and pass him to safety, but then became caught in the rip current himself. Lifeguards finally reached him and performed CPR, but were unable to save him. He was later pronounced dead at a nearby hospital.

The cause of death has yet to be determined.

Friends said the Rosengren family is devastated.

“He’s one in a million,” Pete’s friend Joe Shaker told NBC Chicago. “He is the perfect definition of a best friend you could ask for. He always put others ahead of himself all the way to the end...

“Those boys meant the world to him, and he was all about coaching and raising them,” Shaker said.

The tragedy happened the day before what would have been Pete and Maura Rosengren’s 18th wedding anniversary, the Herald reported.