A California store security guard has a decision to make: whether to go back to the job he was fired from after he tackled a man who allegedly hit a deputy.

Deputies in Placer County, California, were chasing Timothy Trujillo through a shopping center parking lot on Jan 11, KXTV reported.

Tyler, who did not give his last name, saw what was happening as he worked at the Best Buy in the center.

"When they confronted him, the man punched one of the detectives and tried to run off. That's when the security guard tackled the man, preventing him from escaping," Lt. Andrew Scott told KTXL.

>> Read more trending news

Tyler told the KTXL he thought he was doing the right thing, but also that he broke the company rules.

"I understood that when I went back in there I was going to get into some type of trouble because Best Buy policy says we aren't supposed to touch anybody," Tyler told KTXL.

Tyler said his manager told him corporate decided to fire him.

Best Buy officials sent KTXL a statement that read, "Our policy is clear, employees are not to chase potential criminals outside of the store. Chasing an individual in the parking lot creates a safety risk that isn't worth taking, regardless of how noble an employee's intention is."

But the company changed its mind Monday and announced it is offering Tyler his job back.

In an additional statement, Best Buy officials told ABC News, "We made a decision to terminate our employee for violating our clear policies but have had reason to take another look at what happened. In the end, we understand he made a split-second decision to do what he thought was right and, while we wish he hadn't put himself or anyone else at risk, we regret our initial decision and will be offering him his job back."

There’s no word on whether Tyler will return to his former employer.

As for Trujillo, he has been charged with assaulting and resisting a peace officer, possession of burglary tools, burglary and possession of methamphetamines, KXTV reported.