Big waves and the risk of rip currents triggered warnings and swimming bans at some southern Maine beaches Thursday and were expected to continue into Friday morning.

Surfers, meanwhile, flocked to the beaches to take advantage of the conditions.

Ogunquit beaches posted red flags to indicate that no swimming was allowed, while Wells beaches posted blue flags indicating that swimmers could enter the water but should be careful about strong waves and currents.

Hurricane Cristobal has churned up heavy surf all along the East Coast as it moved northeast far offshore. Cristobal was due east of New Jersey on Thursday morning and was expected to pass by New England and the Gulf of Maine Thursday and early Friday.

The National Weather Services issued a high surf advisory along the Maine coast through 11 a.m. Friday. The advisory warned that waves of 4 to 8 feet were expected along the Maine coast and that the storm effects “make for high risk of rip currents . . . into Friday.” Rips are strong currents that can pull a swimmer away from shore.

The weather service warned that the waves also could be dangerous for people who are drawn to the shore to see the effects of the storm. “Large waves can sweep a person into the ocean from what may normally be a safe viewing area,” the advisory said.

Waves at some beaches Thursday afternoon were larger than usual, but the surf was not as rough as experienced along the mid-Atlantic states.

Ogunquit Fire Chief Mark O’Brien said the town posted red flags at beaches Thursday morning rather than allow swimmers to risk the high surf. The big waves arrived just after some of the town’s lifeguards have left the beaches to go back to school, he said.

The red flags don’t apply to surfers and there were many in the water Thursday morning. “Surfers are still allowed, but they’re on their own. It’s at their own risk,” O’Brien said.

Katie Bordeau, lifeguard captain in Wells, said swimmers there were allowed to go into the surf under a cautionary blue flag. She and others were keeping an eye on conditions in case the afternoon high tide created stronger waves and currents, she said.

Surfers also have been drawn to the waves in that town, Bordeau said. “They’re loving it.”