PORTLAND, Ore. -- The hockey mask-wearing gunman who killed two people and himself in a shooting rampage at a U.S. mall deep into the Christmas shopping season was 22 and used a stolen rifle from someone he knew, authorities said Wednesday. The rifle jammed and mall employees had been trained for the possibility of a mass shooting, and authorities said the death toll could have been worse.

Jacob Tyler Roberts had armed himself with an AR-15 semiautomatic rifle and had several fully loaded magazines when he walked briskly into an Oregon mall on Tuesday afternoon and started firing at random, said Clackamas County Sheriff Craig Roberts.

The sheriff said the rifle jammed during the attack, but he managed to get it working again.

The gunman then fled into a back hallway, down stairs and into a corner, where police found him dead from an apparent self-inflicted gunshot, authorities said.

The sheriff said authorities didn't yet have a motive.

Employees at the mall had been trained to run and hide, lock down and evacuate. Since previous mass shootings elsewhere in the U.S., the first arriving police officers were trained to form teams and go inside instead of waiting for speciality teams.

"This could have been much, much worse," Roberts said.

Two people -- Steven Mathew Forsyth and Cindy Ann Yuille -- were killed, and another, Kristina Shevchenko, was wounded and in serious condition.

A law enforcement official told The Associated Press the shooter did not have a criminal record. The official spoke on condition of anonymity because he was not authorized to discuss details of an ongoing criminal investigation.

The shooting started shortly after a man in a white mask carrying a rifle and wearing a bulletproof vest said, "I am the shooter," as if announcing himself, said Austin Patty, 20, who works at a mall department store.

A series of rapid-fire shots followed as Christmas music continued to play. Patty said he ducked and then ran.

Witnesses said the suspect fired several times near the mall food court until the rifle jammed, and he dropped a magazine onto the floor and ran into the Macy's store.

Some were close enough to the shooter to feel the percussion of his gun.

"I saw a gentleman face down, obviously shot in the head," said Jason DeCosta, the manager of company with a display on the mall's ground floor. "A lot of blood. You could tell there was nothing you could do for him."

DeCosta said he also saw a woman on the floor who had been shot in the chest.

The first emergency call came at 3:29 p.m. Tuesday. The first officers arrived a minute later. By 3:51 p.m., all the victims and the gunman and rifle and been found.

The mall Santa, Brance Wilson, said he heard gunshots and dove for the floor. By the time he looked up, seconds later, everyone around him had cleared out. Parents with children joined other shoppers rushing to stores' backrooms for safety.

"Santa will be back," Wilson said. "It's not going to keep Santa away from the mall."

Shaun Wik, 20, said he was Christmas shopping with his girlfriend and opened a fortune cookie at the food court. Inside was written: "Live for today. Remember yesterday. Think of tomorrow."

As he read it, he heard three shots. He heard a man he believes was the gunman shout, "Get down!" but Wik and his girlfriend ran. He heard seven or eight more shots. He didn't turn around.

"If I had looked back, I might not be standing here," Wik said.