An Idaho man accused of firing rifle shots at the White House because he wanted to kill President Obama made his first court appearance in the District on Monday and was ordered to remain in detention and undergo a psychiatric evaluation.

Oscar Ramiro Ortega-Hernandez, 21, who has described himself as the second coming of Jesus, appeared briefly before Magistrate Judge Alan Kay in U.S. District Court on a charge of attempting to assassinate the president.

The suspect, his dark hair hanging to his shoulders, said little as he stood before Kay in a white T-shirt, his wrists shackled and fastened to a chain around his waist. When Kay read the charge, Ortega-Hernandez looked to the floor and shook his head slightly from side to side.

Obama and first lady Michelle Obama were in San Diego on Nov. 11 when a volley of shots from a semiautomatic rifle was fired at the White House from about 750 yards away. The fact that the president was far removed from the gunfire does not negate an attempted-assassination charge, authorities said.

The charge is based on Ortega-Hernandez’s alleged intent to kill Obama, which authorities said he had expressed to acquaintances in the past year. A conviction is punishable by up to life in prison.

The FBI said some of the rounds struck the exterior of the upper floors of the White House — the residential area. One bullet pierced a window but was stopped by ballistic glass behind it, according to a federal criminal complaint.

In court Monday, Kay told Ortega-Hernandez that he has a right not to answer questions from law enforcement officials and to be represented by a lawyer. After Ortega-Hernandez said he did not have enough money to hire a lawyer, Kay ordered that he be represented by the federal public defender’s office.

In the criminal complaint, made public last week, authorities said people in Idaho told them that Ortega-Hernandez, in an increasingly agitated state, described Obama as “the devil” and “the antichrist” and said that he “needed to kill” the president.

Kay declined to set bail and ordered Ortega-Hernandez to undergo a mental evaluation before a preliminary hearing scheduled for Monday, at which the U.S. attorney’s office will be required to disclose more of its evidence against him.

Ortega-Hernandez, who left his home in Idaho Falls late last month, is accused of firing the shots from his 1998 Honda Accord after stopping the car near Constitution Avenue and 17th Street NW about 9 p.m. Minutes later, authorities say, he abandoned the vehicle in the 2300 block of Constitution and fled on foot.

A Romanian-made assault rifle, equipped with a telescopic sight, along with ammunition, nine spent shell casings, a set of brass knuckles and an aluminum baseball bat were left behind. After a five-day manhunt, he was arrested without incident at a Hampton Inn in western Pennsylvania.