The US Capitol Police arrested a man at a security checkpoint in Washington on Friday after he flashed a personal identification card that an officer had labeled “unauthorized” and found an unregistered pistol and ammunition during a search of his truck.

A federal police officer said the man, Wesley A. Beeler, 31, was a contractor and that his ID was issued by the park police but not recognized by the police officer. The officer spoke on condition of anonymity as he was not authorized to discuss the arrest. Mr. Beeler has no known extremist relationships, the official said.

“It was an honest mistake,” Beeler told the Washington Post after he was charged with illegal possession of a firearm and released on Saturday afternoon. He said he did a security job in Washington, was late for work and forgot his gun was in his truck.

“I drove to a checkpoint after getting lost in DC because I’m a compatriot,” he told the Post. “I showed you the initiation badge that was given to me.”

The arrest comes after police officers tried to fortify Washington ahead of the inauguration day on Wednesday, fearing extremists encouraged by President Trump’s supporters’ attack on the Capitol on January 6, may attempt violence cause. A militarized “green zone” is being established in the city center, members of the National Guard are flooding the city, and a metal fence is being erected around the Capitol grounds prior to the swearing-in of President-elect Joseph R. Biden Jr.

Mr. Beeler of Front Royal, Virginia, drove to a security checkpoint less than half a mile from the Capitol compound on Friday evening and produced “an unauthorized personal induction badge” according to a statement from a Capitol police officer filed in a District court of Columbia on Saturday. The officer, Roger Dupont, said he checked the ID against a list and found that Mr Beeler was not allowed to enter the restricted area.

Officers searched his truck, which had several weapon-related bumper stickers, and found a loaded Glock pistol, 509 cartridges for the pistol, and 21 shotgun shells, police said. Mr Beeler had admitted having the Glock in the center console of the truck when asked if there were guns in the car, they said.

Mr. Beeler has been charged with five crimes, including possession of a gun and ammunition in Washington without proper registration. He and his lawyer did not respond to requests for comment on Saturday, but in his interview with The Post, Mr Beeler denied having 500 rounds of ammunition.

In an interview, Paul Beeler said Mr Beeler’s father, his son, a father of four, had been doing security near the Capitol grounds for the past few days and had other security duties in Washington over the years. Mr. Beeler has an active private security license in Virginia and is licensed to carry firearms while in use there, according to a state website.

“He was proud of the work he did with the police and the National Guard,” said his father. When asked if he believed his son would support a peaceful transfer of power, he said, “That’s why he’s there.”

The elder Beeler said he became concerned when his son didn’t return text messages on Friday night and called him Saturday morning thinking his son would be returning to Virginia after his shift. He and his wife discovered that Mr Beeler had been arrested when they received a call from a reporter, he said.

Police officials said they were alarmed by the chatter from far-right groups and other racist extremists threatening to target the nation’s capital to protest Mr Biden’s election victory. Federal authorities tried to prevent some people who violated the Capitol with weapons earlier this month from returning to the city, including by restricting their ability to board commercial aircraft, according to an administrative official.

For security reasons, Mr Biden has resisted requests to move the inauguration ceremony inside. His inauguration committee had already planned a reduced celebration with virtual components because of the corona virus.