CHICAGO — A convicted counterfeiter with an apparent grudge against the courts was arrested Thursday on charges of plotting to blow up a federal courthouse, but he never actually had materials to make a truck bomb, authorities said.

Prosecutors said Gale William Nettles, 66, was arrested with a pickup truck containing 1,500 pounds of fertilizer that he allegedly thought was volatile ammonium nitrate, the farm chemical used to blow up the Oklahoma City federal building.

Nettles had planned to sell the chemical to terrorists who would blow up the Dirksen federal building, U.S. Attorney Patrick J. Fitzgerald said in announcing the charges Thursday. But all the other people involved, including the “terrorists” and the people who sold him the fertilizer, were cooperating witnesses or federal agents, Fitzgerald said.

Nettles told the undercover agent he could make a 3,000-pound fertilizer bomb.

“He had a rational plan to build a bomb. We weren’t going to wait to see if it would work,” Fitzgerald said.

Timothy McVeigh used a bomb made of 4,800 pounds of ammonium nitrate to blow up the Oklahoma City federal building in 1995, killing 168 people.

Nettles was arrested at a park early Thursday with the pickup truck when he met the undercover agents who he thought were terrorists, according to the criminal complaint. The fertilizer he obtained in the sting does not have the explosive potential of ammonium nitrate.

According to the complaint, Nettles met July 26 with an undercover agent he thought was a member of a terrorist group. In a recorded meeting, Nettles said he had a half ton of ammonium nitrate in New Orleans that he could have in Chicago in two days and that he had a target in mind — the U.S. courthouse downtown, the complaint said.

A federal magistrate Thursday ordered Nettles held until a detention hearing Tuesday. No plea was entered, and defense attorney John Theis declined to comment afterward.

Nettles was released from prison in 2003 after serving time for counterfeiting and apparently retained a grudge against the court system, Fitzgerald said. The Dirksen federal building in downtown Chicago houses federal criminal and civil courts and the U.S. attorney’s office.

Fitzgerald said Nettles was not working with any other groups but had asked cooperating witnesses about contacting Al-Qaida and Hamas.

Nettles also had a previous conviction for armed robbery in Cook County and was on parole at the time of his counterfeiting arrest. In 2001 he claimed he had mental disabilities, according to court documents.

“He’s 66 and he’s spent — probably conservatively — 45 of those years in prison,” said attorney Ronald J. Clark, who represented Nettles in the counterfeiting case. “It surprises me that Gale would seriously be involved in something of this magnitude,” Clark said. He described Nettles’ counterfeiting as a “fairly pathetic attempt.”

Nettles had been living at a transient hotel in Chicago since his release following the counterfeiting sentence, authorities said. Sam Gelles, 35, another hotel resident, said Nettles was an introverted computer whiz who went by the nickname “Pops.” “You couldn’t really read him,” Gelles said.