The Idaho man accused of firing rifle shots at the White House last month “was deadly serious” about killing President Obama, the government alleged in a recent court filing. They said Oscar Ramiro Ortega-Hernandez bought hundreds of rounds of ammunition for weeks of target practice on isolated land near his home.

Oscar Ramiro Ortega-Hernandez

For example, after purchasing a Romanian-made semiautomatic rifle for $550 in March, the court filing says, Ortega-Hernandez bought 1,200 rounds of 7.62x39 mm ammunition for the weapon. Then he spent a lot of the summer practice firing in “a desolate crater” on federal land outside of Idaho Falls, where he lived at the time.

Ortega-Hernandez, 21, is being held without bail, charged with attempting to assassinate the president. Thursday’s court filing was a government memo requesting his continued detention.

Late in the summer, “Ortega-Hernandez purchased a scope kit on the Internet,” prosecutors said. It included “a mount, a scope, a laser sight and a flashlight.” After installing the equipment, he continued practice firing at “items like a home stereo amplifier, an empty ammunition can, a video cassette recorder and a stereo speaker,” they said.

On Friday, a federal magistrate judge in the District denied a prosecution motion seeking an extensive psychiatric evaluation of Ortega-Hernandez to determine whether he is mentally competent to take part in legal proceedings. A clinical psychologist declared him competent last month after a 50-minute evaluation.

Ortega-Hernandez has referred to himself as the second coming of Jesus and allegedly told Idaho acquaintances that Obama should be killed because he is “the devil” and “the anti-christ.” He told at least one person that he had been “chosen” by God to “take care” of Obama, meaning to assassinate him, according to prosecutors.

He also allegedly spoke of bizarre plots, such as the government installing global positioning system devices in people’s bodies to keep track of them and federal officials “trying to dumb us down” by forcing companies to use fluoride and aspartame in certain products.

Ortega-Hernandez stopped his black, 1998 Honda by the Ellipse on Constitution Avenue NW about 9 p.m. on Nov. 11 and opened fire on the White House from the front seat, prosecutors allege. Authorities have variously referred to finding 9, 10 or 12 spent shell casings in the abandoned car shortly after the incident.

At least two rounds hit the exterior of the residential floors on the mansion’s south side, the FBI said. After a five-day manhunt, Ortega-Hernandez was arrested at a motel in western Pennsylvania.

As for how he got there without his car, Thursday’s court filings says that three days after the shooting, a photographer who takes pictures of railroad trains as a hobby saw a man who turned out to be Ortega-Hernandez riding as a stowaway in a freight car near Shenandoah Junction, W.Va., near the Pennsylvania border.

Under questioning after his arrest, prosecutors said, Ortega-Hernandez denied opening fire on the White House.

He “claimed that he had been the victim of a brazen daylight robbery. . . outside a Popeye’s chicken restaurant” hours before the shooting, prosecutors said. “The purported robber pulled a gun on him and took his wallet, his keys, his car and its contents.

“When asked if he knew about the shooting at the White House,” prosecutors said, “Ortega-Hernandez replied that it must have been done by the person who stole his car.”