Police in the resort of Pineda del Mar, just north of Barcelona, closed the town’s four beaches on Thursday evening after lifeguards spotted four small blue sharks in shallow waters.
The sharks, which usually inhabit more tropical waters, are generally not dangerous to humans but can cause panic.
The four sharks spotted off Pineda del Mar were “no more than two metres long” according to Spanish daily La Vanguardia.
Local police closed the beach at around 7.15pm on Thursday evening and lifeguards raised a red flag, indicating that no bathing was allowed.
By Friday morning the flag had been changed to yellow, according to the local town hall, indicating that while there was still need for caution, visitors to the beach were now permitted to bathe.
Experts have warned tourists who venture into the water to stay close to the shore and not swim out too far while the warnings are still in place.