LAYTON — A federal agent shot a man after he walked out of the Layton Hills Mall Tuesday afternoon.

The U.S. Marshals Service Violent Fugitive Apprehension Team was tracking a 28-year-old man and approached him when he came out of the mall about 3:30 p.m., said Matthew Harris, the U.S. marshal for the district of Utah.

The fugitive, whose name has not been released, ran from the marshals when he was asked to stop, Harris said. He got into his vehicle and allegedly began “ramming” police cars before shots were fired.

Marshals had been tracking the man for several hours that morning, but waited until he was outside the mall, rather than confronting him inside, in an attempt to avoid putting the public in danger, Harris said.

The man, whose name was not released Tuesday, was taken to a hospital to be treated for his injuries. Harris said he did not know the man’s condition.

The man was wanted on felony warrants in several cities, Harris said, including a warrant for armed robbery.

“The information we had when we were apprehending this violent fugitive was that he was armed,” Harris said. “And if we’re going after somebody and we’re spending the time and resources going after somebody, you can assure that they’re the most violent among us.”

A woman was with the man when he came out of the mall.

Natalie Goodwin was one of several people parked near where the shooting took place. She came out of the mall to find a crime scene next to her vehicle.

“I was like, ‘Please tell me they didn’t hit that car because it’s a rental car,” Goodwin said.

“Scary to think this happened in Layton,” she added.

Layton police are investigating the shooting.

Contributing: Andrew Adams