A federal grand jury has indicted Patrick J. McCrea, who was wounded in a shootout with FBI agents this past week.

The indictment charges McCrea, 25, Layton, with attempted homicide of a federal agent and possession of a firearm by a restricted person stemming from the incident.McCrea was shot in the shoulder and arrested Wednesday afternoon after allegedly firing two shots at agents with an FBI Violent Crimes Task Force. Authorities said McCrea had been tracked to the Rolling Hills trailer court in Layton before the exchange of gun-fire.

The trailer court siege ended a six-day hunt for McCrea, who police allege also fired on four probation and parole officers May 1 in Salt Lake City.

McCrea had been at large since February when he walked away from drug treatment and parole at the Bonneville Halfway House in Salt Lake City.

On Wednesday, "McCrea stuck his head out of the door of the trailer . . . (and) fired at least one shot (at FBI and Layton officers)," according to an affidavit filed in U.S. District Court.

When the officers announced themselves, "McCrea withdrew back into the trailer, but then immediately stuck his head back out of the trailer and again pointed his weapon at the agents and officers," the affidavit states.

This time officers fired back, hitting McCrea in the shoulder.

McCrea dropped his gun, but held agents at bay for another 45 minutes before giving up, the affidavit charges.

About six days before the standoff, a confidential informant told the FBI McCrea "intended on killing a cop," court documents state.

Four years ago, McCrea allegedly threatened to kill a Salt Lake County deputy who later shot the then-fugitive in the legs.

McCrea has prior convictions for theft, giving false information, unlawful possession of alcohol, possession of drug paraphernalia, as-sault, burglary and assault on a peace officer, according to the federal affidavit.