When federal agents asked Houston police officer Tam Dinh Pham why he was in Washington during the pro-Trump riot at the U.S. Capitol earlier this month, he said he had traveled there on business and then attended the president’s rally on a whim. But most importantly, Pham told the agents, he did not go inside the Capitol during the attempted insurrection.

That’s when an FBI agent showed him his own deleted images and videos from inside the Capitol Rotunda on Jan. 6, according to court documents.

Faced with the photo evidence, Pham then allegedly admitted to climbing over torn-down fences to get inside. But still, he insisted his reasons were benign: He just wanted the rare opportunity to view “historical art,” investigators said.

Pham, 48, was arrested on Wednesday on charges of unlawful entry of the Capitol and violent entry and disorderly conduct on Capitol grounds. He is one of more than a dozen off-duty police officers under investigation for allegedly participating in the violent and chaotic insurrection earlier this month.

Some Trump allies have speculated that antifa was responsible for inciting violence and storming the U.S. Capitol on Jan. 6. No evidence supports this claim. (The Washington Post)

Pham resigned on Jan. 14 from the Houston Police Department, Police Chief Art Acevedo announced on Twitter. He had worked for the department for about 18 years, according to court documents.

In a statement on Wednesday acknowledging Pham’s arrest, Acevedo said that the police department worked with the FBI to investigate Pham’s involvement in the riot. Houston police are now auditing all of Pham’s arrests, including reviewing body-camera footage, “to ensure there are no irregularities,” Acevedo said.

The federal investigators interviewed Pham in his Richmond, Tex., home on Jan. 12. After denying that he had gone inside the Capitol during the riots, a special agent asked to review the images in his phone.

Although there were no pictures dated Jan. 6, the agent checked Pham’s “deleted” folder and found videos and images of him inside the Rotunda, including one shot of him posing in front of a statue of former president Gerald Ford affixed with a “Trump 2020” flag, federal officials said.

Once the agent showed Pham the digital proof that he was, indeed, inside the Capitol, she reminded him that it was illegal to lie to a federal agent.

That’s when Pham changed his story, federal agents said, while insisting he just wanted to see art in the Capitol.

He added that he was not a member of any social media groups that promoted the rally and that he did not meet up with any of President Donald Trump’s supporters before the event. Pham also said he didn’t bring any weapons to Washington and that he “had no intention of committing any act of violence or vandalism at the Capitol,” according to court documents.

When the rally was over, Pham said he noticed people walking toward the Capitol and followed the crowd. He then admitted to entering the building, adding that he saw the police officers guarding the Capitol but “did not engage with them,” according to federal investigators.

Pham told investigators that he stayed inside the Rotunda for 10 to 15 minutes, taking pictures and videos, before leaving. The metadata in his phone backed up that story, investigators said.

In a statement to NBC News, Pham’s lawyer, Nicole Hochglaube, said that Pham cooperated with the FBI and that he is “deeply saddened to be associated with the domestic terrorists who attacked our Capitol on January 6th″ and “believes strongly in the rule of law, and that the election choosing President Biden was fair and free.”

It is unclear when Pham is due back in court.