A federal agent who in March shot and killed a man near a Sandy TRAX station — whom he stumbled on while trying to track down a different fugitive — was legally justified in using deadly force, the Salt Lake County district attorney ruled Wednesday.

“The issue isn’t that it was the wrong person,” said District Attorney Sim Gill. “The question is: Were the officers’ lives put in danger?”

Resident Agent in Charge Brian Embley of the Bureau of Alcohol, Tobacco, Firearms and Explosives was with two other officers on March 13 searching for Brian Solis, who was wanted on a federal warrant. A confidential informant apparently gave the team a cellphone number for Solis, and the officers “pinged” the phone to a parking lot across the street form the Historic Sandy UTA station, 9000 S. 165 East.

When they got there, three people — a man and two women — were standing outside a BMW. The agents could tell that the man was not Solis from a photo they had, according to the district attorney’s report.

Still, they decided to talk to the group to see why the phone might be “pinging” near their car. The agent asked the man, Bryan Keith Liles, 31, for his ID. Liles told officers it was inside the car and that he would grab it. They told him not to, but he got into the BMW.

Liles started the car and began driving as one of the agents reached in to stop him. Embley was standing in front of the BMW yelling “Stop!” multiple times, he told the district attorney. He then fired at Liles, fearing he would be run over or that the other agent would be dragged.

Embley called it a “very split-second decision” in his statement to Gill.

The agent was able to pull himself free of the vehicle, and he and Embley chased it a few feet away as it continued to roll. Liles stopped and asked the officers why they shot him. Embley said he asked Liles to put up his hands, but he instead reached toward the floor of his car.

Embley then fired another round, fearing Liles was grabbing a gun, according to Gill’s review. Liles was hit four times and transported to the hospital, where he died.

Investigators did later find a handgun in Liles car, but Embley said he never actually saw a weapon. None of the officers was wearing a body camera, and surveillance cameras in the area were too far away for the footage to show much, the district attorney concluded.

Liles also had warrants out for his arrest for probation violations. He pleaded guilty in January 2017 to charges of possessing a dangerous weapon, drug possession and theft by receiving stolen property. In June 2017, Liles pleaded guilty after leading police on a chase along Interstate 15 in Utah County.

Two witnesses who were at the car with Liles corroborated the agents’ account of what took place. One said that she and Liles had bought the BMW that day and were arguing because it kept overheating as they drove.

She said Liles hit her in the mouth and chin and threatened her with a gun. Photos taken at the hospital showed consistent injuries on her face. The gun found in the car was listed as stolen from a Taylorsville address.

Cecil “Jocko” McCants, Liles’ father, declined to comment on the report Wednesday on advice of his attorney. After the shooting, he talked to reporters about how officers were searching for a different man

“And now my son’s dead over it,” McCants said at the time.

Gill said the case was deemed justified because Liles posed a credible threat to the officers’ lives. He had several chances, he added, but “apparently chose to disobey those orders.”

“We conclude,” he wrote, “that Agent Embley reasonably believed deadly force was necessary to prevent death or serious bodily injury to himself or another person, and was therefore a ‘justified’ use of deadly force.”