Two men were rescued by a Coast Guard boat in Hampton Bays after the wooden dock they were working on broke free Thursday and drifted out into rough waters in Shinnecock Inlet, the Coast Guard said.

The two men were working on a dock at the Oakland's Marina just before 4 p.m. when it broke free and drifted off, stranding the two men, officials said.

"Conditions were pretty bad out there, especially if you're stranded on a piece of dock adrift without a lifejacket," said Petty Officer 1st Class Matthew Peryea, who was in charge of the rescue boat.

Eric Swanson, a Coast Guard spokesman, said neither man had a life jacket and water conditions compounded the danger. Conditions were between 25- and 35-mile-per-hour winds, and seas that were 3 to 6 feet high, Swanson said.

Almost immediately after the 15-foot by 6-foot dock went adrift, a witness on land notified the Coast Guard by telephone, officials said.

A 25-foot Coast Guard response boat with a crew of four from the nearby Coast Guard Station Shinnecock was immediately dispatched, but by the time they reached the dock, it had already drifted out about a half mile into the rough waters, Swanson said.

The dock and men were brought back to shore safely, Swanson said, and the men did not require any medical attention.

The names of the men were not released by the Coast Guard, but Swanson said, "I know they were really appreciative of getting off that dock."

Get the latest news and more great videos at NewsdayTV Credit: Newsday

Boaters feeling pinch at pump ... Weekend weather outlook ... USA 250: Burning of the hay ... FeedMe: Sandbox food trucks ... Get the latest news and more great videos at NewsdayTV

Get the latest news and more great videos at NewsdayTV Credit: Newsday

Boaters feeling pinch at pump ... Weekend weather outlook ... USA 250: Burning of the hay ... FeedMe: Sandbox food trucks ... Get the latest news and more great videos at NewsdayTV

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME