Portuguese man o' war sightings at North Carolina's Oak Island prompted a purple flag warning Sunday and into the July 4 holiday week, with officials urging beachgoers to be cautious. 

A purple flag indicates dangerous marine life in the water and advises visitors to swim with caution. 

Closely related to the jellyfish, Portuguese man o' war is a species of siphonophore and has tentacles that average 30 feet long, but can extend to 100 feet, according to NOAA. The man o' war usually floats alone but can sometimes be in legions of 1,000 or more.

"Resembling an 18th-century Portuguese warship under full sail, the man o’ war is recognized by its balloon-like float, which may be blue, violet, or pink and rises up to six inches above the waterline," NOAA said. 

The sting from a man o' war rarely kills people, but is described as being very painful and usually causes welts on exposed skin. The man o' war may still sting weeks after it washed ashore. 

If you encounter a man o' war in the ocean, officials advise calmly leaving the area.

"Typically, surf conditions, tides, weather, and other wildlife such as crabs and birds will remove these from the beach with days, or even hours," the Oak Island Police Department said.

Oak Island is one of the southern-most beaches in North Carolina, not far from the South Carolina border.

The purple flag warning remains in effect until further notice.