A spectacular bright blue glow is coming from San Diego's ocean thanks to a red tide offshore, according to Scripps Institution of Oceanography.

Photographers captured the bioluminescent display at local beaches Tuesday night. Scripps scientists Michael Latz said the eerie blue glow under the ocean's surface is created by a massive number of dinoflagellates, small organisms that move through the sea.

The dinoflagellate is a type of algae that glows as a natural defense mechanism from predators that try to eat the blooms.

“The algae makes a light when a fish or little shrimp tries to eat it, said Dimitri Deheyn, a research scientist with the Scripps Institution of Oceanography. "That light attracts a bigger fish that can eat whatever is trying to eat the algae.”

Deheyn adds this phenomena will start when one algae lights up to sacrifice itself for the sake of the rest of the bloom.

A #RedTide has brought #bioluminescence to San Diego beaches. Learn more about the phenomenon here: https://t.co/tB60nDSkHD. Photo by Erik Jepsen/UC San Diego pic.twitter.com/JiKg28Gz42 — Scripps Institution of Oceanography (@Scripps_Ocean) May 9, 2018

Red tides create conditions that increase these "blooms" of dinoflagellates, possibly because of nutrients or hydrographic conditions in the ocean, but the cause is not entirely understood, according to Scripps.

"Here in California these blooms of dinoflagellates are usually not toxic," said Deheyn. "So feel free to go swimming in the bioluminescence, it's an awesome experience. Or you can take the algae and smear it around the sand to watch it glow."

The best time to capture the dramatic glow is at night. According to Deheyn, the idea time is two hours after sunset in a place with no lights, such as Torrey Pines, Carlsbad or Encinitas.

Do not bring a flashlight or shine your camera light because the algae will not bloom.

"If you are a parent and you can't get out at night go down to the ocean with a water bottle and scoop up some water near North County," said Deheyn. "Leave it in a completely dark room for a few hours and then swirl the bottle around. You'll be able to see the bioluminescence."

It is not clear how long the red tide or the ocean bioluminescence will last, so San Diegans should head to beaches soon for a chance to see the dramatic blue waves.

