WASHINGTON – A 21-year-old man with a self-professed hatred for Washington and President Barack Obama was arrested Wednesday in connection with rifle shots fired near the White House last week, as authorities sought to link the gunfire to bullet damage discovered at the executive mansion, officials said.

The suspect, Oscar Ramiro Ortega-Hernandez, who had been the focus of an intense law enforcement search since the gunfire Friday evening, was arrested at a western Pennsylvania hotel shortly after 12:30 p.m., the Secret Service said.

U.S. Park Police had obtained an arrest warrant charging him with felony possession of a dangerous weapon.

On Tuesday, four days after the gunfire, officials discovered at least one bullet hole in a window on the south side of the White House, the Secret Service said.

The window is about 750 yards from where the shots were fired, at Constitution Avenue and 16th Street, between the Ellipse and the Washington Monument.

The bullet pierced the “historic exterior glass” of the window but was stopped by the ballistic glass behind it.

Authorities declined to say whether they found other bullet damage at the mansion.

Ortega-Hernandez, whose permanent place of residence is unclear, has a record of arrests for minor offenses in Texas, Utah and Idaho, authorities said.

They said they have not linked him to any radical organizations.

In trying to determine why he recently traveled to the nation’s capital from the western U.S., investigators searched the Occupy D.C. campground near the White House, but so far have found no connection between him and the protesters, according to officials familiar with the case.

One of the officials, speaking on the condition of anonymity because the investigation is continuing, said the motive for the gunfire might have been simple anger. Ortega-Hernandez “hates the president, he hates Washington, he hates society,” the official said.

Ortega-Hernandez fired shots with an AK-47-style assault rifle about 9:30 p.m. Friday — his 21st birthday — while in a car at 16th Street and Constitution Avenue, police said.

Ortega-Hernandez then abandoned the car a short distance away and ran, police said. They said they found the rifle and an undisclosed number of spent shell casings in the car.

Pennsylvania State Police arrested Ortega-Hernandez at a hotel in Indiana, Pa., about 70 miles east of Pittsburgh

Obama was not in the White House at the time of the incident and is now in Australia.