CHICAGO (STMW) — A judge refused Monday to release a man from federal custody after prosecutors accused him of threatening through Facebook to shoot a “high net worth individual” before leaving for Pakistan.

Mohammad Waqas Khan even claimed he went on a “good dry run” and “saw a couple of excellent targets” last May, according to federal prosecutors. Then, on May 13, he allegedly wrote, “Rahm Emanuel and the uppity aldermen have doomed Chicago to an early grave.”

“You shall be taught a lesson you will not forget!” Khan allegedly wrote. “Rabid dogs!”

The next day, authorities said they searched Khan’s bedroom and found a semi-automatic handgun, semi-automatic shotgun, six loaded magazines and a knife with a 10-inch blade. In the basement they said they also found a sword with a curved 24-inch blade. The feds noted Khan has an FOID card.

Defense attorney Ellen Domph tried Monday to characterize Khan’s missives as “ranting” and even suggested they might be rap lyrics. But U.S. Magistrate Judge Jeffrey Cole said, “There is nothing rap-ish in anything he posted.”

Meanwhile, prosecutors said Khan appears to have mental health issues that have not been addressed. They said he wrote May 7 on Facebook that “this is not a moral world so I think it’s time that you stop moralizing. Stop moralizing and start FIGHTING. … You need to pick up arms and raise hell.”

Later that day, he allegedly wrote, “Alrighttt you called for it … I’m goin hunting tonight baby!” Then, after declaring he wanted “a high net worth individual to shoot,” prosecutors said he added, “I want this to be a real human tragedy. Much mourned.”

Authorities followed Khan on May 13 as he drove around Uber passengers in his 2005 Toyota Corolla, prosecutors said. They ultimately lost sight of him but realized by 1 a.m. that he’d returned home.

At 1:11 a.m., he allegedly posted a message that began, “the gun is cocked and ready to go. You keep sending those witnesses around and they’re gona see some sh— go down that they might not have signed up for.”

“Now I’m gona get my revenge, and that involves putting bullets in someone’s body, so get out of the way or I’ll literally shoot at them as well and we’ll end up with a much bigger scenario on our hands. I’m not leaving America without getting revenge even if it costs me my life.”

A federal prosecutor told the judge Monday that Khan worked for Uber. Authorities also said Khan bought a round-trip plane ticket in April to Karachi, Pakistan.

DuPage County sheriff’s police arrested Khan on May 14 for allegedly violating concealed carry laws, and federal prosecutors said he attacked an officer at the DuPage County Jail.

His attorney said he’s been incarcerated since May, but wasn’t arrested for the federal charges until earlier this month, records show.

(Source: Sun-Times Media Wire © Chicago Sun-Times 2015. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)