View Photo Gallery: Oscar Ramiro Ortega-Hernandez is suspected of firing shots near the White House, cracking a window.

Oscar Ortega-Hernandez.

Convinced that the federal government was conspiring against him, the 21-year-old man accused of firing rifle shots at the White House last week drove from Idaho to Washington in an old Honda Accord on a mission to kill President Obama, whom he described as “the devil” and “the anti-Christ,” authorities say.

Oscar Ramiro Ortega-Hernandez, who was charged Thursday with attempting to assassinate the president, had “increasingly become more agitated against the federal government” in recent months, an FBI agent wrote in a court affidavit.

Before leaving his home in Idaho Falls about a month ago and driving 1,800 miles to the nation’s capital, Ortega-Hernandez told acquaintances that he “needed to kill” Obama and that he “will not stop until it’s done,” Agent Chris Ormerod wrote, quoting those acquaintances.

Ortega-Hernandez, arrested Wednesday in western Pennsylvania after an intense, five-day law enforcement search, allegedly fired shots at the White House from about 750 yards away shortly after 9 p.m. Friday. The president and First Lady Michelle Obama were in San Diego at the time.

The affidavit alleges that Ortega-Hernandez stopped his black, 1998 Honda near 17th Street and Constitution Avenue NW and opened fire through the passenger-side window, using a Romanian-made Cugir SA semiautomatic rifle equipped with a telescopic sight. At least two motorists witnessed the shooting, Ormerod wrote.

Minutes later, the affidavit states, Ortega-Hernandez abandoned the car about six blocks west of the White House, on the lawn of the United States Institute of Peace, in the 2300 block of Constitution. In the car, authorities found several boxes of 7.62x39mm ammunition, three loaded ammunition magazines and nine spent shell casings, Ormerod wrote.

Also in the car was a set of brass knuckles and an aluminum baseball bat, according to the affidavit. The Honda, bearing Idaho license plates, is registered to Ortega-Hernandez and another person.

On Tuesday, four days after the gunfire, the Secret Service said that it found a bullet hole in a window on the south side of the White House. The slug had pierced the “historic exterior glass” but was stopped by ballistic glass installed behind the normal glass, the Secret Service said.

Ormerod wrote in the affidavit that the FBI “conducted a search of the area around the White House and located several confirmed bullet impact points on the south side of the building on or above the second floor. The second and third stories of the White House are known to be the residence of the First Family. Several bullets and fragments were also collected in that area.”

The president and first lady had left Washington for San Diego several hours before the shooting and later traveled to Hawaii for the Asia-Pacific Economic Cooperation summit.

FBI ballistics experts are trying to determine whether the slugs recovered on the White House grounds came from the rifle found in Ortega-Hernandez’s car, authorities have said.

The affidavit was made public Wednesday after Ortega-Hernandez’s initial appearance before a federal magistrate in Pittsburgh, who ordered him to remain in custody. Authorities intend to bring him to Washington and prosecute him in U.S. District Court here.

Attempting to assassinate the president in punishable by up to life in prison, the U.S. attorney’s office in Washington said.

In an interview with investigators in Idaho, one acquaintance of suspect “stated that Ortega-Hernandez wanted to ‘hurt’ President Obama and referred to him as “the anti-Christ,” Ormerod wrote. This person also ”stated that Ortega-Hernandez ... is convinced that the federal government is conspiring against him.”

Another acquaintance “stated that over the past year, Ortega-Hernandez’s opinion and comments regarding the government and President Obama have gotten worse. Ortega-Hernandez was very specific that President Obama was the the problem with the government, and Ortega-Hernandez was ‘preparing for something.’”

This person quoted Ortega-Hernandez as saying that Obama “need to be taken care of,” the affidavit says.

At least two motorists witnessed the gunfire south of the White House, Ormerod wrote: One heard about eight “popping sounds” coming from a dark-colored sedan stopped near 17th and Constitution; the other described “puffs of air” coming from the passenger-side window the vehicle. The dark sedan then sped away.

Minutes later, another witness saw what turned out to be Ortega-Hernandez’s Honda stopped on the lawn of the peace institute, near an on-ramp to the Theodore Roosevelt Memorial Bridge, according to the affidavit. The witness began approaching the stranded car to see if the driver needed help.

“While walking toward the vehicle, [the witness] observed the operator attempt to restart the car, and then get out and flee the area on foot,” Ormerod wrote. Authorities said Ortega-Hernandez fled across the bridge, over the Potomac River, and into Virginia.

In searching for him, the Secret Service said, agents distributed photos of Ortega-Hernandez in several places where they learned he had been in recent weeks, including a Hampton Inn just outside Indiana, Pa., about 60 miles east of Pittsburgh.

Ortega-Hernandez, who had stayed at the hotel before, returned there Wednesday, authorities said. Employees recognized him from the photo and called Pennsylvania State Police, who arrested him. Police said Ortega-Hernandez did not put up a fight.

The U.S. Park Police said Ortega-Hernandez has a record of arrests on minor counts in Texas, Utah and Idaho. They said investigators have not linked him to any radical organizations.

Before Ortega-Hernandez was captured, investigators searched the Occupy D.C. campground near the White House but have found no connection between him and the Occupy protesters, according to three law enforcement officials familiar with the case.

Read the arrest warrant and affidavit:

More news from PostLocal:

Washington’s coming housing crunch

Va. driver charged in fatal head-on collision

Relief coming to Beltway/Toll Road interchange

Former school employee charged in sexual assault