Police shot and killed a 49-year-old man suspected of shooting seven people Sunday at a birthday pool party in an apartment complex near the University of California, San Diego, authorities said.

Police received reports of a man shooting people by the swimming pool at around 6pm, Chief Shelley Zimmerman said at a news conference.

Four black women, two black men, and one Hispanic man were taken to hospitals with gunshot wounds, Ms Zimmerman said. One of the women later died. Ms Zimmerman, during a press conference, later said that the shooter was motivated by a breakup with a girlfriend and not motivated by race.

Several victims were in surgery late Sunday and others were still critical late Sunday, Ms Zimmerman said.

One man was taken to the hospital after he broke his arm while fleeing.

"This is truly a horrific act of violence that took place here today," San Diego Mayor Kevin Faulconer said at a news conference.

"Our entire city, all of our thoughts and prayers, all San Diegans' thoughts and prayers, are with the victims and their families tonight."

A police helicopter arrived to the scene first and the pilot reported seeing multiple victims and that the suspect, Peter Selis, was still in the pool area and appeared to be reloading.

"We could see the shooter sitting there with a beer in one hand, and the gun in the other," a witness at the apartment complex said.

Three officers on the ground shot the suspect after he pointed a large-caliber hand gun at them, Ms Zimmerman said.

Police believe that Mr Selis lived in the complex. Before firing on the partygoers, a friend of the suspect reportedly offered him something to eat and drink at the party. Mr Selis, a father and car mechanic who "faced crushing debt" and had filed for bankruptcy previously, reportedly did not give any indication that he planned on shooting people beforehand, a witness told the San Diego Union-Tribune.

One of the partygoers is believed to live at the same complex, Ms Zimmerman said.

Police are investigating.