Police say a gunman who opened fire at a pool party in San Diego on Sunday evening, killing one person and wounding six others, was “despondent” over a recent breakup.

Before the attacker was killed exchanging gunfire with police officers, he called his ex-girlfriend on the phone and made her “listen in as he carried out his rampage,” according to San Diego Police Chief Shelley Zimmerman.

There were initial concerns that the shooting was motivated by racial animus because the attacker — identified by police as Peter Raymond Selis, a 49-year-old white man — had shot six black people and a Hispanic man. But a day after the shooting, Zimmerman said police had “zero information this was racially motivated.” Instead, she said the victims were simply around when Selis began “to shoot indiscriminately” at a crowd gathered at the pool in his condominium complex.

“These victims were just in his presence at the wrong place at the wrong time when he committed this terrible tragedy,” Zimmerman said in a briefing Monday.

Selis was a resident of the condominium complex where the shooting occurred, police said. According to bankruptcy filings, he struggled in recent years with sizable debt and had worked as a mechanic at a Ford dealership in San Diego.

Zimmerman said that investigators found out that Selis and his girlfriend broke up in the days before the shooting. She said Selis’s relatives said he was “distraught and depressed over the breakup,” though these family members had no idea he would turn to violence, Zimmerman said.

Police were called shortly after 6 p.m. Sunday after reports of a shooting at the pool area of the complex, Zimmerman said. Authorities later learned that someone was holding a large birthday party around the pool, she said.

As police officers hurried to the residential area about 12 miles north of downtown San Diego, the reports continued flooding in: A man with a gun had opened fire. At least three or four people “were down in the pool area.”

Zimmerman said that at some point after the first gunshots, Selis laid down on a lounge chair, took out his cellphone and called his ex-girlfriend to tell her what was happening.

“He was on the cellphone, talking with his ex-girlfriend, while he was continuing to shoot,” Zimmerman said.

Police have not identified Selis’s ex-girlfriend. The shooting came just two weeks after a man in Cleveland fatally shot another man in a video posted on Facebook and then blamed the attack on an ex-girlfriend. In the video, the Cleveland gunman had asked the man he shot to say his ex-girlfriend’s name before pulling the trigger.

Seven minutes after the first call came in about gunshots at the party, police officers arrived while a helicopter hovered overhead and spotted the gunman holding a handgun in the pool area. When three officers approached the pool area, the gunman began firing at them. They returned fire, hitting and killing him, Zimmerman said.

Zimmerman said she has been reviewing footage from the body cameras worn by officers and found the shooting within accepted police rules about the use of deadly force. As part of a standard protocol in officer-involved shootings, the San Diego County District Attorney’s Office will review the camera footage and other evidence.

In a briefing late Sunday, Zimmerman had said that a black woman was killed in the shooting. She also said three black women, two black men and a Hispanic man were wounded, while another black man broke his arm trying to run away.

“There is zero info to indicate that race played a factor in this terrible and horrific crime,” Zimmerman said. “The victims were targeted for no reason other than their mere presence in the vicinity of the suspect.”

One person was killed and several others were injured after a gunman opened fire at a pool in San Diego on April 30. The gunman was shot and killed by police. (Reuters)

Attempts to reach Selis’s relatives in California and Indiana on Monday were unsuccessful. Members of his family, along with other people who may have known him, did not immediately return messages or declined to comment when reached.

Selis, the son of a dentist, had seven siblings, all of whom appear to live in the San Diego area. Selis had appeared smiling in their Facebook posts of family gatherings as recently as a month and a half ago.

In a 2015 bankruptcy filing, Selis listed more than $108,000 in debt he owed to creditors. Selis wrote in the same filing that he worked as a mechanic at Mossy Ford, a dealership in San Diego, since at least 2010.

An operator who answered a Mossy Ford phone number, reached Monday, said, “We are unable to disclose any information at this time,” before hanging up. A Ford Motor Co. representative did not immediately respond to a request for comment.

“Yeah, there’s not much to say about that,” said Michael Rabino, one of Selis’ co-workers, before also hanging up on a reporter.

Selis was no longer listed on the Mossy Ford website as of Monday morning. A cached version of the page showed that he had been listed as “Pete Selis,” a service technician, with his listing accompanied by a photo showing him in his work shirt.

Tony Perry in San Diego contributed to this report.