After the Sept. 11 attacks, Joseph Astarita sought to follow in the footsteps of his father, an F.B.I. agent, joining the bureau and later earning a spot on the New York office SWAT team.

But he dreamed of joining the elite Hostage Rescue Team, and after a failed effort, he landed with the unit on his second try in April 2015.

Now Mr. Astarita faces prison, the ultimate disgrace for an agent sworn to uphold the law. He was indicted on charges of lying and obstruction of justice after a deadly clash with a well-known anti-government activist. His federal trial starts Tuesday in Portland, Ore., and is expected to last several weeks, putting a spotlight on the F.B.I.’s Hostage Rescue Team.

Prosecutors say Mr. Astarita, 41, tried to cover up the firing of two shots during the arrest of the activist, LaVoy Finicum, during the confrontation at a remote federal wildlife refuge in January 2016 in Oregon.

Mr. Finicum was part of a small group of armed militants who had been protesting at the Malheur National Wildlife Refuge near Burns, Ore. Led by two brothers from a Nevada ranching family, Ammon and Ryan Bundy, they were protesting the imprisonment of a pair of ranchers convicted of lighting fires that burned federal land.

Video footage recorded by a passenger in Mr. Finicum’s truck showed that the shots were fired after he stepped out. Prosecutors believe only Mr. Astarita could have fired those shots, basing their case on surveillance videos and photographs.

Mr. Astarita has maintained his innocence, and many of his hostage rescue teammates believe him. His lawyers, who declined to comment, recently wrote in court documents that Mr. Astarita had training that helped keep him from firing the shots, a point they are likely to emphasize at trial.

“He is one of the nation’s most elite, well-trained and disciplined shooters,” they wrote. “He would not have fired in these circumstances. And if he had, he would not have missed.”

But why would Mr. Astarita lie about the shooting? Prosecutors have a theory: Because agents are prohibited from firing into vehicles except under certain circumstances, admitting he shot at Mr. Finicum might have cost Mr. Astarita his coveted spot on the hostage rescue unit.