This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

A gunman was fatally shot by police after shooting erupted on the Redondo Beach Pier Wednesday night, leaving at least two people injured, officials said.

Officers responded around 8:20 p.m. to a series of 911 calls reporting an active shooter on the pier, Redondo Beach police Lt. Shawn Freeman said.

Witnesses said the shooter was down in the pier parking lot and began randomly shooting at people up on the pier.

One man told KTLA he was shot at, and his ear was still ringing hours later because “it was that close.”

“He just missed me again as I was ducking,” he said.

The man said the gunman seemed like “he was mad at the world or something, mad at everybody.”

“Whoever was going by, he was taking pop shots at them,” he said.

There were two wounded in the shooting and hospitalized in stable condition, but the extent of their injuries was unknown, according to police.

The first officers at the scene encountered the gunman and wound up opening fire. It wasn’t immediately clear how many shots were fired, Freeman said.

Despite the police shooting, the gunman was able to run from the scene, the lieutenant added.

Aerial video showed officers investigating in a rocky area along the beach around 9:45 p.m. A SWAT team was setting off smoke as they appeared to search the area.

Authorities were able to locate the shooter by the rocks, and he was pronounced dead, officials said. The man was not immediately identified.

Bystanders on the pier had been told to shelter in place as investigators searched for the shooter. The public was asked to avoid the area in a safety alert sent shortly before 9:30 p.m.

“If you are at a restaurant or business on the pier – or know someone who is on the pier, please stay inside until further notice,” the city alert stated.

Other agencies had responded to assist in the investigation, including the Los Angeles County Sheriff’s Department and Manhattan Beach, Torrance and El Segundo police.

The Sheriff’s Department will lead the investigation into the deadly police shooting.

No further details were available.