A 27-year-old man who was arrested after applying to become a New Orleans police officer appeared in court in Chicago on Thursday to face charges that he brutally stabbed and bludgeoned his boss to death during an argument over his pay in 2016 on the city’s Southwest Side.

Justin Payne was denied bail on charges of first-degree murder and armed robbery in the death of 64-year-old Louis Pena, according to Chicago Police and the Cook County state’s attorney’s Office.

Pena, the owner of L&L Trucking at 4259 S. Keating Ave. in the Sleepy Hollow neighborhood, had employed Payne as a semitrailer driver, prosecutors said on Thursday.

A witness told investigators that prior to his death, Pena had said he intended to fire Payne due to poor performance and attendance at work, prosecutors said.

On Dec. 30, 2016, Payne was seen wearing a “half mask” as he entered the trucking yard and walked toward a trailer that Pena used as an office, prosecutors said.

According to authorities, Payne argued with Pena inside the trailer about his pay before he pulled out a knife, stabbed Pena repeatedly and then struck him in the head with a hammer. After killing Pena, Payne stole $3,000 in cash from the man’s pocket.

Pena was found dead about 9:20 a.m. that day, according to Chicago Police.

An autopsy found Pena had been stabbed 17 times and suffered severe trauma to the brain and skull. His death was ruled a homicide by assault.

A surveillance camera recorded Payne leaving the trailer with a white bag and driving off in his Buick Lucerne, prosecutors said.

Payne moved to New Orleans, and he was arrested there last month after applying to become a police officer. A simple background check revealed he was suspected in the Chicago murder, according to New Orleans police.

In a videotaped interview with detectives, Payne at first denied being in the trucking yard on the day of the killing, but he later identified himself as the person seen on video surveillance in the lot, prosecutors said.

He also allegedly admitted to stabbing Pena and hitting him with a hammer before taking the money from Pena’s pants. He then put the hammer in the white bag and walked out, prosecutors said.

Payne told detectives he tried to wash the blood from his clothes, but ended up throwing them away.

He is scheduled to return to court for arraignment on Feb. 15.