YOUNGSTOWN – Rescue crews battled 5-foot swells Saturday afternoon as they raced to the scene of a capsized boat with three men aboard in the frigid waters of Lake Ontario, about four miles from the mouth of the Niagara River, off Old Fort Niagara.

Common sense and good fortune helped the three, who were fishing, to survive, officials said.

The men, who were not identified, were said to be in stable condition following the late-afternoon rescue by American and Canadian Coast Guard crews, assisted by a team from Lewiston Fire Company No. 1.

But the ending could have been very different, said Coast Guard Petty Officer 2nd Class Craig Deats-Cascio, who participated in the rescue.

When the 19-foot pleasure boat capsized at about 3:40 p.m. in 37-degree water, the three men made the decision to stick together and climb atop the overturned vessel, keeping them out of the water for the roughly 45 minutes it took rescue crews to arrive, Deats-Cascio said.

It was a life-and-death situation, he added.

”When we arrived, they were huddled together atop the boat,” said Deats-Cascio, who noted the men were wet from three- to four-foot waves crashing over the boat.

He also said only one of the three wore a life jacket.

“It’s good we got there when we did,” said the officer, who added that it doesn’t take very long for hypothermia to set in. ”Luckily, they got home safely.”

Two of the men were taken to Mount St. Mary’s Hospital in Lewiston. Mercy Flight flew the third, who had a pacemaker, to Erie County Medical Center in Buffalo for evaluation.

The three used a cellphone and a global positioning system to help rescuers track them down.

Though there is heavy ice presence in much of the Niagara River because of the recent removal of the state Power Authority ice boom, ice was not much of a factor in navigating the lake, Deats-Cascio said.

He said there are “many factors that affect survivability” in such frigid conditions, including the age and physical condition of the victims. He added that the men’s decision to stay together and with the boat was a wise one.

“”You never know when the unexpected can happen,” he said.

Officials did not say what caused the boat to capsize, though conditions on the lake were choppy.

The recreational boat was towed to safety.

“The air is warm enough for boating season, but water temperatures are still dangerously cold,” said Deats-Cascio, who was officer of the day at Station Niagara.

“These three men are lucky to be alive, thanks to the hard work and cooperation between the Coast Guard and our partner agencies.”