A top aide to Sen. James Webb was charged yesterday with trying to carry a loaded pistol and extra ammunition into a Senate office building, U.S. Capitol Police said.

The staffer, Phillip Thompson, told police that the gun belonged to Webb (D-Va.), authorities said. Thompson also said he forgot that the gun was in a briefcase and meant no harm, they said.

Thompson, 44, a longtime friend of Webb's and the senator's executive assistant, was jailed pending an appearance today in D.C. Superior Court. He was charged with carrying a pistol without a license and possessing an unregistered firearm and unregistered ammunition.

The gun was discovered at 10:30 a.m. when Thompson arrived at the C Street entrance of the Russell Senate Office Building, according to Sgt. Kimberly Schneider, a Capitol Police spokeswoman. An X-ray machine revealed the gun in a briefcase. Police also found two fully loaded magazines, officials said.

A Senate official familiar with the incident said Webb gave the gun to Thompson as Thompson drove the senator to an airport earlier in the day. When Thompson arrived at the Senate building, he forgot he was carrying the weapon, the official said.

Another source said that Webb's gun was in a briefcase that was supposed to be dropped off at a location in Virginia before Thompson came into the District.

D.C. law bars people from carrying handguns and concealed weapons without licenses.

Webb, a first-term senator and former Marine, regularly uses a gun for target practice at the National Rifle Association shooting range, the source said. Webb was an expert marksman as a Marine and once taught marksmanship using a .45-caliber handgun, the source said. It is not clear how regularly Webb carries a concealed weapon while in Virginia.

Webb, an advocate of gun rights, declined to comment on the case or explain whether he wanted the gun in the Russell building. During his campaign last year, Webb pulled out a permit to carry a concealed weapon as a sign of his commitment to the right to bear arms.

His communications director, Jessica Smith, sent out a prepared statement saying the episode was a mistake.

"To our knowledge, this incident was an oversight by the Senator's aide," Smith said. "Phillip Thompson is a former Marine, a long-term friend and trusted employee of the Senator. We are still awaiting facts."

Any senator who has a gun permit and wants to bring a gun onto congressional property must unload the gun and make sure it is "securely wrapped," Schneider said. In this case, the problem was that the gun was loaded and that Thompson was not registered to have it, she said.

Thompson's family could not be reached for comment yesterday.

Thompson is a former writer and Marine who fought in the Persian Gulf War, said Robert Hodierne, senior managing editor for Army Times Publishing Co., where Thompson used to work as an editor.

"He's a fine fellow," Hodierne said. "He's married with kids, a family man, a solid citizen."

Army Times, a Gannett Co. subsidiary, publishes four weekly newspapers covering the military: Army Times, Navy Times, Air Force Times and Marine Corps Times. Most recently, Thompson worked as an editor in the features and lifestyle section that appeared in the papers, Hodierne said.

He left last March to work for the Webb campaign, Hodierne said. According to an online biography, Thompson is from Mississippi and is the author of two books: "Into the Storm," a memoir of his time in the Persian Gulf War, and "The Enemy Within," a novel.