SAN FRANCISCO (CN) – In a win for government-transparency advocates, the FBI has agreed to turn over records it created when it spied on two anti-war journalists and pay $299,000 to settle their attorneys’ fees.

The deal, which brings to a close a four-year battle for the records under the Freedom of Information Act, is spelled out in two stipulations filed in San Francisco federal court – one on Friday and the other in January.

Julia Mass, an attorney with the American Civil Liberties Union of Northern California, which filed suit on behalf of the journalists, said in an interview Monday that her clients are pleased with the results.

But, Mass said, “it’s unfortunate that we had to litigate so extensively in order to get the documents, and the documents themselves reveal a very troubling focus on our clients’ political speech.”

With the ACLU’s help, Journalists Eric Garris and Dennis Raimondo sued the FBI in 2013, after they learned the agency was monitoring their libertarian news website Antiwar.com.

According to Garris and Raimondo, they learned about the surveillance after their names appeared in another FOIA request posted online. Documents in that request included an FBI memo revealing that the agency had conducted a threat assessment of the two men and Antiwar.com in 2004, and that an FBI analyst had suggested looking into whether their activity could “constitute a threat to national security on behalf of a foreign power.”

Justice Department spokesman Abraham Simmons declined to comment on the case Monday.

Once they learned that Antiwar.com was under surveillance, Garris and Raimondo submitted their own FOIA requests for records on themselves and the site, the bulk of which the FBI refused to release. So they sued for the remaining records.

Reached by phone Saturday, Garris declined to comment until he received an all-clear from his legal team.

On Monday, Mass said the team believes the FBI produced all the records her clients had requested. The records include ones that discussed either Garris and Raimondo or Antiwar.com, or ones discussing other issues but which referenced Antiwar.com because it had written about the issue, she said.

“We certainly expect it was everything they had,” Mass said. But, she added, “because that information is in the hands of the FBI, we can never know for certain.”

Though Garris and Raimondo agreed to drop their FOIA claims, they stopped short of dropping two other claims under the Privacy Act, which are pending before a judge.

One claim seeks to have the FBI expunge inaccurate records related to Garris, including one it created stating Garris threatened to hack the FBI’s website and which prompted the agency to launch its investigation. Garris say he had actually reported a hacking threat against Antiwar.com to the FBI.

The other claim asks the FBI to expunge records “describing how plaintiffs Raimondo and Garris exercise their rights guaranteed by the First Amendment.”

After Garris and Raimondo learned of the surveillance, they ran editorials detailing the surveillance on their site, which they say scared off three major donors for fear they would also be monitored. They say the site has lost $75,000 a year in donations since 2011, “chilling” their free speech.

“We will continue to challenge the FBI’s collection and maintenance of descriptions of our clients’ First Amendment activities in violation of the federal Privacy Act,” Mass said.

Garris and Raimondo describe Antiwar.com, launched in 1995 to oppose U.S. intervention in the Balkans, as an “an anti-interventionist, pro-peace website with a purely journalistic mission: revealing the truth about America’s foreign policy.”

It is sponsored by the Randolph Bourne Institute, a Bay Area organization that promotes “a non-interventionist foreign policy for the United States as the best way of fostering a peaceful, more prosperous world,” according to its website.

The plaintiffs are also represented by Laura Hurtado of Pillsbury Winthrop Shaw Pittman in San Francisco. The FBI is represented by Justice Department attorney Rebecca Falk, also in San Francisco.