BELFAST, Maine — Police said quick thinking and quick action by two men averted tragedy Thursday morning when they came to the aid of an elderly woman who had accidentally driven into the harbor at the city’s boat ramp.

“There’s no doubt in my mind they saved her life,” Officer Wendall Ward of the Belfast Police Department said.

Eva Lenfest, 92, of Searsport told him later that she had thought she was driving on the road until she hit the water. That’s how it had looked to a family of tourists who also were at the Belfast waterfront that morning and witnessed the accident. It was almost high tide, raining heavily, and both the pavement and the water were covered in a layer of autumn leaves.

“We saw this lady just come hurtling down,” Andrew Ewers of Kangaroo Island, Australia, said.

After the car went into the water, the woman “kept yelling, ‘Help, help,’” said Ewers’ mother-in-law, Sheila Herndon of Salem, Virginia.

Lenfest’s car started to float and then started to sink. The tourists watched as two men who had been working at the harbor — Assistant Harbor Master Howard Whitcomb and Bryden Burleson of Belmont Boatworks — raced around to a rubber dinghy then zoomed over to help her. Burleson got the door opened somehow, then both men tugged at Lenfest to get her out of the sinking car.

“Both of us had to yard on her hard,” Whitcomb said. “When we were pulling her, her legs were pinned, and the car was pulling us.”

As they dragged her through the window, the car started to sink more quickly, according to bystanders. But the men were able to get her into the dinghy and bring her to shore. Lenfest was cold, a little disoriented, but generally OK, according to Sgt. John Gibbs. She was taken to Waldo County General Hospital to be treated. A hospital spokesperson said later Thursday that she had been released.

Meanwhile, Whitcomb joined the efforts to mark the sunken vehicle and put a boom around the boat launch area to keep any oil or gas from getting into the harbor. Burleson went home to dry off, according to Belmont Boatworks co-worker Bud Steeves.

“It sounds like a case of him being at the right place at the right time,” Steeves said.

By about 1:30 p.m., a tow truck and diver sent by the Maine Department of Environmental Protection arrived to pull Lenfest’s late-model white sedan out of the water.

According to police, it was not the first time someone had mistakenly driven off the boat ramp in Belfast. Ward said a woman drowned years ago, when she drove into the harbor at night when no one was around to help.

Ward said that it was lucky that the incident Thursday happened during the day and that several people witnessed it and were able to help Lenfest.

The family of tourists said that her rescuers deserve “the town medal.”

“They were a godsend,” Ewers said.