A man who authorities said was keeping weapons and military-style gear in his hotel room and car appeared in court Thursday on charges he threatened to assassinate Democratic presidential candidate Barack Obama.

Raymond Hunter Geisel, 22, was arrested by the Secret Service on Saturday in Miami and was ordered held at Miami's downtown detention center without bail Thursday by a federal magistrate.

A Secret Service affidavit charges that Geisel made the threat during a training class for bail bondsmen in Miami in late July. According to someone else in the 48-member class, Geisel allegedly referred to Obama with a racial epithet and continued, "If he gets elected, I'll assassinate him myself."

Get Breaking News Delivered to Your Inbox

Obama was most recently in Florida on Aug. 1-2 but did not visit the South Florida area.

Another person in the class quoted Geisel as saying that "he hated George W. Bush and that he wanted to put a bullet in the president's head," according to the Secret Service.

Geisel denied in a written statement to a Secret Service agent that he ever made those threats, and the documents don't indicate that he ever took steps to carry out any assassination. He was charged only with threatening Obama, the presumptive Democratic nominee, but not for any threat against President Bush.

Geisel's court-appointed attorney declined comment. The charge of threatening a major candidate for president or vice president carries a maximum prison sentence of five years.

The Obama campaign declined comment Thursday on the alleged threat.

In the interview with a Secret Service agent, Geisel said "if he wanted to kill Senator Obama he simply would shoot him with a sniper rifle, but then he claimed that he was just joking," according to court documents.

A search of Geisel's 1998 Ford Explorer and hotel room in Miami uncovered a loaded 9mm handgun, knives, dozens of rounds of ammunition including armor-piercing types, body armor, military-style fatigues and a machete. The SUV, which has Maine license plates, was wired with flashing red and yellow emergency lights.

Geisel told the Secret Service he was originally from Bangor, Maine, and had been living recently in a houseboat in the Florida Keys town of Marathon, according to court documents. He said he used the handgun for training for the bail bondsman class, had the knives for protection and used the machete to cut brush in Maine.

Authorities in Maine said Geisel pleaded guilty to a charge of criminal threatening after a 2007 incident and spent 48 hours in a Bangor jail.

Police in Hampden, a town just outside of Bangor, received a complaint from Geisel's brother on Oct. 18, 2007 that Geisel had threatened him with a knife, Hampden police Sgt. Dan Stewart said. Geisel was charged with criminal threatening and terrorizing; the second charge was later dropped.

The Secret Service affidavit said Geisel told agents that he suffered from psychiatric problems including post-traumatic stress disorder, but he couldn't provide the names of any facilities where he sought treatment.