An Amtrak police officer who fatally shot a Minnesota man as he fled from a pat-down search outside Union Station in 2017 was found not guilty of murder charges Friday by a Cook County judge.

Judge Dennis Porter made his ruling four days after the conclusion of a week-long bench trial of LaRoyce Tankson.

Porter — no stranger to controversy in cases involving police officers — is the judge who, in 2015, threw out involuntary manslaughter charges against former Chicago Police officer Dante Servin in the off-duty killing of Rekia Boyd.

Tankson shot Chad Robertson in February 2017, after Robertson took off running as Tankson and his partner patted down two of Robertson’s friends near the downtown train station.

Porter ruled that Tankson’s decision to shoot at 25-year-old Robertson was reasonable and found the officer not guilty on all counts. The judge also said the lesser charge of second-degree murder would not have been appropriate.

“The evidence is overwhelming that Tankson believed a threat existed…and the amount of force was justified,” Porter said. “The thought that Officer Tankson was some sort of cowboy out to put another notch on his gun is not borne out by the record in this case.”

Tankson wept as he embraced his lawyers after Porter finished reading an explanation for his ruling. In the courtroom gallery, Robertson’s supporters gasped.

Tankson had been placed on administrative duties after he was charged but now he will move to have his police powers restored, Tankson’s attorney Will Fahy said.

“We are thankful for Mr. Tankson and his family. This has been a long ordeal for all of them. I strongly believe this case should never have been charged,” Fahy said.

A civil lawsuit against Tankson and Amtrak is pending.

Rhonda Ward, the mother of two of Robertson’s three children — ages 3 and 9 — was stunned by Porter’s ruling.

”What am I supposed to tell my kids? That there’s no justice for their daddy? That they can’t run, they can’t stand still, [police] will shoot you no matter what you do?” Ward said. “I have known [Robertson] since I was 13 years old. He ain’t never had no gun or done nothing to hurt anybody. He’s been scared of the police his whole life.”

Related Amtrak cop charged with murder bonds out of jail

Tankson was the first officer to face murder charges after State’s Attorney Kim Foxx took office after defeating incumbent Anita Alvarez who faced criticism for not charging Chicago Police Officer Jason Van Dyke sooner in the murder of 17-year-old Laquan McDonald.

“While we respect the court’s decision, we are disappointed with today’s ruling,” Foxx’s office said in a statement Friday. “The State’s Attorney’s Office stands by our decision to charge this case and it was prosecuted to the fullest extent of the law.”

Robertson and a friend had been traveling by bus and were waiting at Union Station during a layover when they left the building and went outside to smoke marijuana with a woman they had met on the trip from Minnesota. When Tankson and his partner came upon the group and smelled marijuana, they told Robertson and his companions to move on.

One of Robertson’s friends returned to the terminal and left with several pieces of luggage, causing Tankson and his partner to grow suspicious. So they followed the man back outside. The two Amtrak officers again confronted the three travelers, this time demanding that they put their hands on a wall so they could perform a search. Robertsons’ friends consented, but Robertson complained, holding up his hands to show he had no weapons.

Robertson then bolted, and Tankson and his partner gave chase. As Tankson rounded a corner, he said he saw Robertson reaching for his pocket. Tankson shouted “gun” and fired a single shot that struck the unarmed Robertson in the back. In his hand, Robertson held a fist-sized bag of a marijuana and a second smaller bag, Porter said. Robertson died days later.

Porter, five years ago, made a directed verdict finding after prosecutors rested their case for involuntary manslaughter against Servin. Porter ruled evidence showed Servin had not acted recklessly when he opened fire on Boyd and her friends in an alleyway behind Servin’s house — but had proved Servin should have been charged with the more serious crime of first-degree murder.

Servin was fired from the Chicago Police Department and last year, sought to have records of the charges expunged from court files.