IMPERIAL BEACH (CBS 8 / CNS) - A shark warning was in effect for Imperial Beach Thursday after a group of surfers spotted a great white just off the coast.

The surfers were near the end of Beach Avenue when they saw some dolphins scatter around 9 a.m. Tuesday, said lifeguard Capt. Robert Stabenow.

About the same time, the shark's dorsal fin appeared. And, photographer Jeff Wallis was taking pictures when he captured the image. The 16 to18 foot great white shark was swimming about 20 yards beyond the surf line.

Later Tuesday, an Imperial Beach lifeguard saw the image online and alerted his colleagues, who tracked down the photographer and interviewed him.

Eventually, the digital image helped someone with the nonprofit group Shark Research Committee identify the shark as a great white.

Scientists at Scripps Institution of Oceanography also looked at the photo and confirmed that the fin does appear to be from a great white.

Stabenow said great white sightings in the area are "very rare."

The city then posted signs warning about the shark.

"We've got a confirmed sighting," he said. "It was credible, and we hope most of the community heeds the warning and stays out of the ocean for the next few days."

Stabenow said the number of surfers Thursday morning appeared down slightly, though dozens were bobbing on their boards in the same general area.

Unless the shark is seen again, the warning will expire Friday, Stabenow said.

Great whites, which can grow up to about 20 feet, mainly subsist on sea lions and other sea mammals.

This is the latest information. The previous story is below.

SAN DIEGO (CBS 8) - Officials issued a warning Wednesday morning after a swimmer spotted a great white shark in the waters off Imperial Beach.

An expert who spoke to News 8 identified the shark as a great white. The shark was thought to measure between 16 and 18 feet long. The sighting comes as a surprise to veteran lifeguard Capt. Robert Stabenow.

"I've been lifeguarding here for 30 years and never had a sighting of an actual shark that's confirmed like that," Stabenow said.

According to witnesses, the shark surfaced for between 15 to 20 seconds, then disappeared.