GREENWOOD, Ind. (AP) — Authorities on Monday identified the gunman who shot five people at a suburban Indianapolis shopping mall, killing three of them, before a shopper shot and killed him as a 20-year-old local man.

Jonathan Sapirman, of Greenwood, began firing after leaving a bathroom at the Greenwood Park Mall shortly before it closed Sunday evening, Greenwood police Chief James Ison said at a news conference.

Sapirman continued shooting people until he was shot and killed by 22-year-old Elisjsha Dicken, of nearby Seymour, who was shopping with his girlfriend, said Ison,

“Many more people would have died last night if not for a responsible armed citizen,” said the chief, noting that authorities were still trying to determine a motive for the attack.

The Johnson County and Marion County coroners’ offices identified the slain victims as a married Indianapolis couple — Pedro Pineda, 56, and Rosa Mirian Rivera de Pineda, 37 — and Victor Gomez, 30, also of Indianapolis.

Although authorities said Dicken was legally armed, the mall prohibits people from carrying weapons on its property.

As of July 1, Indiana law allows anyone age 18 or older to carry a handgun in public except for those prohibited for reasons such as having a felony conviction, facing a restraining order or having a dangerous mental illness as determined by a court. Indiana’s Republican-dominated Legislature retained provisions in the law that allow private property owners to prohibit firearms.

The attack Sunday was the latest in a string of mass shootings in the U.S. Schools, churches, grocery stores and a July Fourth parade near Chicago have all become killing grounds in recent months, though the country’s staggering murder rate can often be seen more clearly in individual killings that rarely make major headlines.

Authorities said Sunday that four of the victims were female and one was male, but they corrected that Monday to two males and three females, including a woman and a 12-year-old girl who were wounded.

Ison said that after Sapirman entered the mall, he walked into a bathroom where he spent about an hour before he emerged and opened fire. He said investigators believe Sapirman spent that time preparing and possibly assembling a disassembled rifle that he had brought in his backpack. He ended up firing 24 rounds within two minutes.

Although police don’t know a motive for the attack, Sapirman’s relatives told investigators that he recently received an eviction notice from the apartment where he lived.

Greenwood is a suburb of about 60,000 people south of Indianapolis.