A sexually frustrated dolphin has closed down a beach in western France.

The 3-meter-long (10 feet) bottlenose dolphin, nicknamed Zafar by locals, started off as a friendly attraction in the Bay of Brest, according to The Telegraph. The bay had become the dolphin's hangout of choice for the last couple of months, and he would often amuse people on boats by playing around them and would sometimes even let swimmers hold on to his fin and swim with him. [Deep Divers: A Gallery of Dolphins]

But lately, Zafar has been caught misbehaving. The dolphin has developed a habit of rubbing up against both people and boats, a sign that he may be in search of, well, sex. He also lifted one woman into the air with his nose, and, in another case, refused to let a swimmer go back to shore, according to the BBC. (That swimmer had to be rescued.)

Zafar's behavior got so bad that the mayor of one of the bayside towns, Landévennec, issued a bylaw banning swimming and diving whenever Zafar's presence is confirmed, according to the BBC. Getting within 50 meters (164 feet) of the dolphin was also banned.

Though Zafar hasn't been too aggressive, a specialist at a Brest aquarium told the BBC that the dolphin could potentially cause unintentional harm with his tail fin.

Dolphins are known to have recreational sex with other dolphins throughout the year and don't have specific time points for mating, according to The Telegraph. But sometimes that sexual energy is directed toward other species, including humans, The Telegraph reported.

Indeed, such sexual behavior from dolphins hasn't gone undocumented.

In the 1960s, NASA funded an experiment to teach dolphins how to make human-like sounds and learn English. Though most of the trainers would work during the day and leave at night, one trainer, Margaret Howe Lovatt, decided to take it one step further and live in the facility with a dolphin named Peter, according to a 2014 article in The Guardian. But Peter soon began showing sexual interest in Lovatt, rubbing himself against her knee, foot or hand. Eventually, when the experiments ended, Peter was transported to another facility, where he allegedly "committed suicide" by consciously not taking another breath, according to The Guardian.

A vet told The Guardian that it was likely because of a broken heart.

Originally published on Live Science.