PASCAGOULA, Miss. (AP) — People and pets are being warned to stay out of the water along the entire mainland of the Mississippi Gulf Coast as toxic bacteria continue spreading eastward.

The Mississippi Department of Environmental Quality started closing some beaches June 22 and on Sunday closed the last two sections near the Alabama line.

The agency has warned that polluted Midwest floodwaters have fed an outbreak of cyanobacterium. Popularly known as blue-green algae, it can cause rashes, diarrhea and vomiting. It is spreading as water from the Mississippi River pours into the Gulf of Mexico.

Mississippi's beaches are a tourist attraction, but those farther east along the Gulf Coast in Alabama and Florida draw more visitors because the water is generally clearer with more waves. Barrier islands along Mississippi tend to keep the water relatively calm.

The National Park Service said Sunday that beaches remained open on Mississippi's barrier islands, and park rangers were monitoring water conditions because of the algae bloom closer to the mainland. One of places remaining open was the popular tourism site of Ship Island, which is about 11 miles (18 kilometers) south of Gulfport and Biloxi.