A Tesla employee from the Twin Cities was arrested near Tesla's headquarters in Austin, Texas, after threatening to kill the company's owner, Elon Musk, and President Joe Biden, according to charges.

Justin M. McCauley, 31, of Rogers, was charged last week in Travis County District Court with third-degree terroristic threats. McCauley was booked into the county jail on Jan. 28 and remained jailed as of Monday morning in lieu of $20,000 bail.

McCauley's online professional bio says he has worked for Tesla for the past three years, most recently as an engineering technician, but the bio does not specify the job's location. Tesla has a site in Brooklyn Park with employees in engineering, information technology and manufacturing.

An arrest affidavit filed on Jan. 31 said the Sheriff's Office was alerted on Jan. 27 to McCauley's threats posted about two weeks earlier on X, the social media site formerly known as Twitter that Musk now owns.

An arrest warrant quoted two posts by McCauley as saying, "I will arrive in Texas, where the war has began [sic] on many fronts @X, @Tesla" and "@JoeBiden @X @Tesla @Elonmusk, I am planning to Kill all of you."

McCauley's wife told police in Rogers that "he was going to Texas and never coming back," the affidavit read. She added that he left in his pickup truck without his cellphone "so he could not be tracked," according to the court filing.

While passing through Oklahoma on Jan. 26, McCauley encountered law enforcement and told an officer that he wanted to speak with the president, the affidavit continued. Asked why, he replied, " 'Wouldn't you want to talk to the president if you knew you were going to die?' "

McCauley was pulled over on Jan. 28 by a deputy for speeding on Interstate 35 near Austin, where he said he was on his way to Tesla's Gigafactory. He claimed to know a secret entrance and "wanted to speak with Elon Musk and provide him with a password only he would know about," KXAN-TV in Austin reported, citing court records.

The Gigafactory, covering 2,500 acres along the Colorado River, is a U.S. manufacturing hub for Tesla's Model Y.

According to court records, McCauley's criminal history includes convictions in Minnesota for disorderly conduct while intoxicated and resisting arrest in Ohio.