CINCINNATI – A gunman carrying hundreds of rounds of ammunition opened fire in a downtown office building Thursday, killing three people and wounding at least two more before he was fatally shot by cops.

Police Chief Eliot Isaac said three or four officers exchanged gunfire with the shooter, identified as Omar Santa Perez. The 29-year-old Perez was armed with a 9mm semi-automatic pistol that was legally purchased, Isaac said.

No motive for the carnage had immediately been determined. Cincinnati Mayor John Cranley said the gunman appeared to target random people during the "horrific" attack.

"There's something deeply sick at work here, and we as a country need to work on it," Cranley said.

Hamilton County Prosecutor Joe Deters told WLWT-TV that the rapid police response likely prevented many more casualties. He says officers immediately charged toward the sound of gunfire coming from the Fifth Third Bancorp’s 30-story headquarters along Cincinnati’s Fountain Square.

He says an investigator told him the suspect had enough ammunition to cause “a bloodbath beyond imagination.”

According to records available online, Perez was a North Bend, Ohio resident who previously lived in South Carolina and Florida. Police were searching his apartment in North Bend Thursday afternoon, looking for any clues about the attack or its motive.

Perez is a U.S. citizen born in San Juan, Puerto Rico, family members said Thursday. Yudy Martinez Perez broke down crying in the kitchen floor of her Forest Park, Ohio home Thursday afternoon when she learned that her nephew was the shooter.

“Oh, no, no, no, no,” the woman said as she slumped against the wall and spoke to Perez’s sister.

The reason Perez selected the bank tower for the shooting is unclear. But in the past, he has made allegations against at least one financial corporation.

In 2017, he filed a lawsuit against CNBC Universal Media, LLC and TD Ameritrade Holding Corporation, alleging that the two companies infiltrated his personal electronic devices, uncovered his identity and published private details about his life. A federal magistrate threw the case out of court, concluding that Perez' claims were "rambling, difficult to decipher and border(ed) on delusional."

Isaac said the rampage took place on the loading dock and then the lobby of the Fifth Third Center in the heart of downtown. A phalanx of police officers and ambulances rushed to the scene at the height of morning rush.

City Councilman P.G. Sittenfeld was the first city official to reveal that the assault had resulted in deaths.

"Terrible shooting incident in the heart of our city this morning," Sittenfeld said. "Multiple shot, and tragically there are fatalities. Details still emerging. Pray for our city."

Killed were Pruthvi Raj Kandepi, 25, Richard Newcomer, 64, and Luis Felipe Calderón, 48, Hamilton County Coroner Lakshmi Sammarco, said.

A Louisville, Kentucky woman was shot 12 times but survived, the Louisville Courier Journal reported. Whitney Austin, 37, is in stable condition, her brother-in-law Lonnie Gardner told the Courier Journal on Thursday evening. Austin was conscious following the shooting and called her husband, Waller, from the ambulance, Gardner said.

A witness said he heard up to 15 shots. Leonard Cain was entering the bank when someone alerted him to the shooting. He said a woman was also walking into the bank and people tried to get her attention, but she had headphones on.

"She walked in the door and he shot her," Cain said.

Michael Richardson, who works in the building, was just outside the main doors smoking a cigarette when he heard gunshots. He said he saw a man firing a gun inside the bank lobby.

“I looked behind me and saw the guy – he shot and then he shot again," Richardson said. "After that I started running."

Police said two people were wounded. The University of Cincinnati Medical Center said that two victims died at the hospital and that one survivor was in critical condition and another was in serious condition.

"We prepare for situations like these and hope they never happen," said Amanda Nageleisen, UC Health spokeswoman. "Our thoughts and prayers are with the victims, their families and all involved."

Radio traffic indicated other victims may have been transported to Good Samaritan Hospital.

Gov. John Kasich and Ohio's senators, Rob Portman and Sherrod Brown, said they were monitoring the situation.

"There was a senseless act of gun violence on the streets of Cincinnati this morning," Kasich said. "I’ve spoken with the mayor and informed him the state will provide any necessary resources to the local police.

The building is located in Fountain Square, a hub for entertainment and dining in the city.

Fifth Third Bank is one of Cincinnati's dominant financial institutions with 121 local branches. The shooting took place at the corporate headquarters, a skyscraper on Cincinnati's main downtown square.

"What a sick, tragic way for this day to begin," Sittenfeld tweeted. "The scourge of gun violence leaves only loss."

Steve Conner lives on the first floor of the apartment building where the Perez lived. Conner said Santa Perez walked often, "looking (angry) at everybody. ... He had a mad look on his face."

Connor said Perez often ignored Conner's attempted greetings.

Perez's aunt said her nephew held various jobs and was currently working, though his aunt and her family did not know where.

“He was very quiet,” said Martinez, who speaks only limited English. “I do not know why. I do not know why.”

Perez' criminal record is a smattering of low-level offenses: entering or refusing to leave the premises in Greenville, South Carolina; marijuana possession in Palm Beach, Florida; traffic offenses in Lake Worth, Florida; traffic offenses in Deerfield Beach, Florida; disorderly conduct in Coconut Creek, Florida. He also has a traffic violation in Cincinnati in 2015 for driving with an expired license plate.

Bacon reported for USA TODAY from McLean, Va. Contributing: Bob Strickley, Sharon Coolidge,Anne Saker,Kevin Grasha and Sarah Brookbank, Cincinnati Enquirer