David Anthony peered over the side of his boat toward the engine and saw the flames.

At that point, he knew there wasn’t much of a choice to make.

“I knew we had to go over,” he said.

What was supposed to be a routine day of pulling up lobster traps for the season turned into a harrowing few hours Tuesday for the 47-year-old Vinalhaven lobsterman and his son and sternman, Blake, 21.

The two escaped the fire by jumping into the icy water and then swimming an estimated 300-400 feet to the nearest shore, Cedar Island, which is just west of Vinalhaven, a Knox County town of about 1,100 year-round residents.

Both father and son were treated late Tuesday afternoon at a medical center on Vinalhaven but were sent home by dinner.

“I didn’t eat a whole lot,” David said Wednesday by phone from his home. “But I guess we were pretty lucky.”

The Anthonys set out Tuesday morning from Vinalhaven in a 25-foot lobster boat they called Midnight Rider. They planned to pull up as many lobster traps as they could to store for the winter.

Just minutes after leaving the island, the fuel pump failed, but Anthony had a spare.

“So I changed the pump but there was a leak,” he said. “So we shut everything down, fixed the leak and went on our way.”

They hauled for about an hour or so. Then Anthony began to smell gas. Strongly.

He looked toward the engine and saw flames shooting out.

“We didn’t even have time to get our survival suits,” he said.

Anthony instructed his son to jump into the water and then he did the same. But before he left the boat, Anthony cut free a lobster buoy that was mounted on the interior of his boat. That quick thinking may have saved their lives.

“If we didn’t have that one buoy to hang onto, I don’t think we would have made it,” he said.

The two men swam toward Cedar Island, pausing regularly to hold their heads above water with the buoy’s help.

“The water was calm, thank God,” Anthony said. “It wasn’t warm by any means, but it wasn’t as bad as I expected.”

They reached land and huddled together on an outcrop of rocks. David was wearing jeans and a sweatshirt. Blake had shed his pants so it would be easier to swim and was wearing only underwear and a long-sleeve T-shirt. They had been in the 47-degree water for about 45 minutes.

Neither man had time to radio for help, but the flames from the boat’s engine spread to the 44 traps that were on board and soon other fisherman could see the fire.

A Maine Marine Patrol boat out of Rockland responded and was met by another boat that carried fire and rescue personnel from Vinalhaven.

The Anthonys were shivering, but otherwise OK.

“That’s a really dangerous situation, even though they were relatively close to shore,” said Jeff Nichols, spokesman for the Marine Patrol. “Even a short stint in water can be dangerous this time of year.”

Anthony, who has been lobstering his whole life, said his boat “burned to the water line,” and the traps “incinerated.”

But he has another boat, a 32-footer that he said needs some work before it is sea-ready, and he has another 250 or so traps still buoyed off Vinalhaven.

“I want to fish next year but I may get a later start,” Anthony said, pausing to reflect once more on the fact that he and his son are fortunate enough to have the chance to fish again. “Our lives were definitely in jeopardy, no question about it.”