Authorities warned vacationers headed to the Mississippi coast to avoid getting in the water after 21 beaches along the state’s coastline were closed because of a harmful blue-green algal bloom.

Beachgoers can stay on the sand but should not come into contact with the water, the Mississippi Department of Environmental Quality said in a statement.

The closures began June 22, and the latest two beaches closed over the weekend.

Blue-green algae, also known as Cyanobacteria, can produce toxins that could cause a host of human health problems, including “hay fever-like symptoms, skin rashes, respiratory and gastrointestinal distress” during short-term exposure, according to the Environmental Protection Agency.

The MDEQ statement said that if skin is exposed to the algae, it should be washed with soap and water. Additionally, the department warned individuals not to eat fish from the affected areas.

Determining just how harmful the toxins are “comes back to the concentration that’s present in the water,” said Joe Griffitt, a professor at the University of Southern Mississippi and interim director of the School of Ocean Science and Engineering.

This type of harmful algal bloom occurs in water that is low in salinity — or water with less salt. Along the coast in Mississippi, it’s likely that a decrease in the salinity of the water caused the current bloom.

The change in salt water was probably caused in part by an old flood-control measure, known as the Bonnet Carre Spillway in Louisiana, which can push large amounts of freshwater into Lake Pontchartrain and then into areas along the Mississippi coast while it is open, said Monty Graham, associate vice president for research of coast operations at the University of Southern Mississippi. The spillway was originally built to be an emergency relief measure for flooding in the 1920s, but today, it’s opened multiple times a year.

“So we’re dealing with 21st-century flooding patterns and relying on 1920s technology,” Graham said.

This year, Bonnet Carre was open longer into the summer to help alleviate the risk of flooding in areas around New Orleans, but that meant winds from the south were sending more freshwater out along the coast. There was also more water flowing down the Mississippi River from flooding in the Midwest. Graham said he hopes that with the expected closure of the spillway, salinity levels along the coast will begin to return to normal.

This increase in fresh water along the coast has also been tied to high rates of oyster deaths. Some 132 dolphins and 175 sea turtles have died so far this year, said Moby Solangi, executive director at the Institute for Marine Mammal Studies.

Algal blooms have plagued the region before, including a red tide event that killed wildlife and closed beaches along the Florida coast last year. Harmful algae has shown up in freshwater lakes and reservoirs around the world.