At least one woman is dead and six people are in critical condition after a man opened fire at a poolside party at an apartment complex in San Diego, California, according to the local police chief.

Police confronted the gunman and fatally shot him while he was trying to reload his weapon. The suspect has been identified.

The incident happened 6.10pm local time at the La Jolla Crossroads Apartments in La Jolla, California, when a white male wearing brown shorts and armed with a gun started shooting those at the pool.

Another image shows blood all over the pool area as a gunman opened fire on people at the #LaJolla apartments #SanDiego San Diego pic.twitter.com/YzIZUzGi0W — William (@willziz) 1 мая 2017 г.

According to witness reports, the man was holding a beer in one hand and brandishing a gun in the other when he opened fire.

San Diego Police Chief Shelley Zimmerman said eight people were injured.

“There were eight victims that were transported, and we had four of the victims were African-American females who were suffering from gunshot wounds that were taken to area hospitals, two African-American males were taken to an area hospital suffering from gunshot wounds, one Hispanic male suffering from a gunshot wound taken to an area hospital, and then one African-American male fleeing the area broke his arm when he was fleeing the gunfire,” Zimmerman said.

One woman later died at the hospital, while six other victims remain in critical condition, according to Zimmerman.

Mass Shooting In San Diego At La Jolla Apartment Complex, Shooter Reported To Be Taken Out By Police.

Prayers For Victims🙏🏼#SanDiego#Praypic.twitter.com/ff7Zbsaow8 — Deplorable😡Rāzərbak (@MediaJuggernaut) 1 мая 2017 г.

A police helicopter reached the scene shortly after the emergency call and officers saw the man reloading his weapon, according to Zimmerman.

Three police officers then arrived and confronted the gunman. After an exchange of gunfire, police shot the assailant. The gunman has been identified as 49-year-old local resident named Peter Selis, the police chief said. The motive behind the shooting remained unknown.

“We are interviewing witnesses and, at this point, we don’t know what the motive is for this shooting,” Zimmerman said.

Witnesses said the group, which was apparently targeted by the shooter, appeared to have been celebrating a birthday party at the pool area.

That moment when a mass shooting hits home -- frantically calling loved ones. 8 shot in #SanDiego area by active shooter. #UniversityCitypic.twitter.com/LrnkqsZI7v — Rachel Currence (@rachel_currence) 1 мая 2017 г.

“This is truly a horrific act of violence that took place here today,” the city’s mayor, Kevin Faulconer, told reporters.

“Our entire city, all of our thoughts and prayers, all San Diegans’ thoughts and prayers, are with the victims and their families tonight,” he said.