The man, Eric McDavid, 37, was convicted in 2007 of conspiring to bomb several targets near Sacramento as part of a radical environmental campaign. The government said he plotted attacks against government and commercial facilities that he believed were harming the environment, including cellphone towers and the Nimbus Dam in California. Mr. McDavid, who visited some sites and at one point tried to make homemade explosives, has served nine years in prison and will be released immediately, according to his lawyers.
His prosecution had become well known in environmental circles partly because of its star witness: a pink-haired informant who began covertly working for the F.B.I. at age 17 after writing a community college paper about infiltrating political protest groups.
Mr. McDavid’s lawyers had asked that his conviction be vacated, citing the withheld information, including a request by officials for a polygraph examination of the informant, code-named Anna, and various messages between her and Mr. McDavid.
Federal prosecutors disputed the value of the material, writing that “none of the omitted items were even remotely exculpatory.” But in a settlement approved Thursday, both sides agreed to Mr. McDavid’s immediate release “to avoid the expenses and risks of further litigation and to advance the interests of justice.”
Under the agreement, Judge Morrison C. England Jr. of Federal District Court in Sacramento accepted a guilty plea by Mr. McDavid to a general charge of conspiracy, and then sentenced him to time served. Judge England also granted Mr. McDavid’s motion to vacate his original conviction and sentence of 235 months, allowing for his release. Mr. McDavid waived any future civil claims.
“Today we corrected one of the most egregious injustices I have ever encountered in my legal career, if you consider being released after nine years of wrongful incarceration justice,” said one of Mr. McDavid’s lawyers, Ben Rosenfeld.
A spokeswoman for the United States attorney’s office in Sacramento did not immediately comment on the agreement.
Mr. McDavid’s conviction came as the F.B.I. carried out a sweeping investigation of arson attacks by a group called the Earth Liberation Front against a Vail ski resort, an S.U.V. dealership and a university botany lab, among other sites. Federal authorities said that Anna, who testified that Mr. McDavid had requested explosives recipes and once threatened her life, had helped thwart a dangerous plot to blow up targets like the United States Forest Service Institute of Forest Genetics in Placerville, Calif., and cellphone towers in California.
“McDavid’s homegrown brand of eco-terrorism is just as dangerous and insidious as international terrorism,” prosecutors wrote in a sentencing memorandum.
Defense lawyers contended that Anna was an unreliable witness who had entrapped Mr. McDavid, manipulating his romantic attachment to her and pushing him and two co-defendants to brew homemade explosives while providing them with food and a place to live.
“She fomented the alleged conspiracy, literally herding defendants together from around the country for meetings, badgering them to form a plan, and mocking and berating them when they showed disinterest,” Mr. Rosenfeld and another lawyer, Mark R. Vermeulen, wrote last year, adding that the withheld material could have been used to challenge Anna’s credibility or examine her relationship with Mr. McDavid.
By many measures Anna was an unlikely spy. She was assigned by the F.B.I. to attend the 2004 national political conventions in Boston and New York, a global trade summit in Georgia and anarchist gatherings in Iowa and Indiana. Anna provided information in a dozen different cases, the authorities said, and stayed in touch with Mr. McDavid. In 2005 she reported that he was planning a bombing campaign, and the F.B.I. increased its monitoring of him.
At the time of his arrest in early 2006, Mr. McDavid was living with Anna and two co-defendants in a cabin in Dutch Flat, Calif., which the F.B.I. had provided and fitted with surveillance equipment that recorded the group discussing reconnaissance trips and the possibility of causing accidental deaths.
The co-defendants, Lauren Weiner and Zachary Jenson, both pleaded guilty in 2006 and testified against Mr. McDavid. Mr. Jenson has since said that he felt pressured to conform to a narrative embraced by the government, an assertion that prosecutors rejected.
After Mr. McDavid’s conviction, a Freedom of Information Act request yielded about 2,500 pages of substantially redacted F.B.I. reports connected to him. Defense lawyers said they thought those documents indicated the existence of material that should have been turned over at trial.
The undisclosed material included several emails or letters between Mr. McDavid and Anna that had been given to the agency’s behavioral analysis unit for review and an F.B.I. document dated two months before Mr. McDavid’s arrest, asking for a polygraph examination to determine Anna’s “veracity” before “the expenditure of substantial efforts and money based on source’s reporting.” F.B.I. officials later said that examination ultimately did not take place.