Image caption Oscar Ortega-Hernandez was initially stopped by police in Virginia on Friday, but was not arrested

The man suspected of shooting at the White House has been charged with attempting to assassinate US President Barack Obama or a member of his staff.

Oscar Ortega-Hernandez, 21, of Idaho, remains in federal custody and is to be prosecuted in Washington DC.

Mr Ortega-Hernandez believed God had given him a personal mission to attack the White House, law enforcement sources say.

A US Park Police bulletin said he was "unstable with violent tendencies".

Mr Ortega appeared in court in Pittsburgh, Pennsylvania, on Thursday afternoon, and said only "Yes ma'am" when a federal judge asked if he understood he would be moved to Washington DC to face the charges.

He was arrested in that state on Wednesday after a manhunt when authorities were tipped off by someone who recognised him.

Last Friday evening, authorities heard gunfire in the area between the Washington monument and the White House.

President not home

Police later discovered an abandoned car with an assault rifle inside.

Two bullets were found on the south side of the executive mansion on Tuesday, the part of the building where the president's bedroom is located.

One bullet broke a "historic" outside pane of glass but was stopped by a protective inner panel of ballistic glass. The second bullet hit the exterior of the building.

The president and first lady were not in Washington at the time, but it is not known if their two daughters, Sasha and Malia, were at home.

Secret Service officials told reporters the bullets had not yet been conclusively linked to Friday's gunfire.

Originally from the US state of Idaho, Mr Ortega was reported missing by his family on 31 October. It is thought that he had been living in the Washington DC area.

He has a history of arrests in Texas, Utah and Idaho but police say he has not been linked with any radical organisations.