Swimming among the dolphins in the clear waters off the Hawaiian coast has long enticed island visitors. But federal officials say it is harmful to the creatures when they are supposed to be resting and socializing, and have proposed a ban on the activity.

The proposed rules, announced this week by the National Marine Fisheries Service of the National Oceanic and Atmospheric Administration, would prohibit swimming with or approaching within 50 yards of Hawaiian spinner dolphins. That would end many tour group practices, which involve approaching dolphins in a boat and snorkeling in the water with them.

Dolphins typically forage offshore in the night for fish, shrimp and squid, then return toward land during the day to relax. They swim even when they are sleeping. But officials say the presence of boats and swimmers is disrupting their habits, causing “a departure from natural behavioral patterns that support the animal’s health and fitness,” according to the proposed guidelines.

The tours are popular with visitors, and the excursions are promoted on the Hawaii Tourism Authority’s website.