San Diego police officers work at a cordoned off La Jolla apartment after a shooting Sunday, April 30, 2017, in San Diego. 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. (AP Photo/Gregory Bull)
San Diego police officers work at a cordoned off La Jolla apartment after a shooting Sunday, April 30, 2017, in San Diego. 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. (AP Photo/Gregory Bull) Credit: Gregory Bull

A gunman despondent over a recent breakup opened fire at a poolside birthday party and phoned his ex-girlfriend as he kept shooting strangers, killing one woman and injuring six other partygoers before he was killed by officers, police said Monday.

Peter Selis, 49, sat on a pool chair during most of the rampage, calmly shooting guests at the party with a .45-caliber handgun. The victims were black and Latino and Selis was white, but police don’t think race played a factor.

“These victims were just in his vicinity when he committed this terrible tragedy,” Chief Shelley Zimmerman said. “What started as a celebration of a friend’s birthday party turned into a tragedy of epic proportions.”

Witnesses said Selis was wearing a black coat and sitting alone during the party for a man’s 50th birthday Sunday at an apartment complex near the University of California, San Diego. At one point the guest of honor invited the man to join the party. That’s when Selis drew a handgun and shot the honoree in the torso, said Demetrius Griffin, a friend at the party.

“He didn’t stand up. He sat the whole time. Even when he reloaded his magazine, he sat in his chair,” Griffin said.

After shooting two people, Selis called his ex-girlfriend and said what he’d done and then continued firing.

Two victims remained in critical condition, but were expected to survive, Zimmerman said. Another man was taken to the hospital after he broke his arm running away.

Three officers arrived and shot Selis after he pointed a large-caliber handgun at them, Zimmerman said.

Selis lived at the complex in the community north of downtown San Diego.

Selis, a father who worked as a mechanic at a Ford dealership, filed for federal bankruptcy protection in October 2015, listing $14,000 in assets and $108,000 in liabilities, according to court records.

“This is truly a horrific act of violence,” 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.”