President Joe Biden took classified information about the U.S. war in Afghanistan and other national security matters when he left the vice presidency in 2017, but he will not face criminal charges, a U.S. special counsel report released Thursday said.

The documents included a handwritten memo to then-President Barack Obama in 2009 opposing a planned troop surge in Afghanistan and handwritten notes related to intelligence briefings and national security meetings, the report by Special Counsel Robert Hur found.

Biden told a writer working on his memoir during a February 2017 conversation at a home he was renting in Virginia that he had “just found all the classified stuff downstairs,” according to the report. Hur’s report said the conversation created “the best case” for charges against Biden.

But Hur identified several reasons why he did not charge Biden, including that the documents may have been taken to his home while he was vice president, when he had the authority to keep such documents.

Hur said Biden would not have faced charges even without a longstanding Justice Department policy against indicting a sitting president.

Members of Biden’s legal team found the classified papers at the office of Biden’s Washington think tank and his personal residence in Wilmington, Delaware.

Biden’s lead rival in the November election, former President Donald Trump, faces a 40-count federal indictment for retaining highly sensitive national security documents at his Florida resort after leaving office in 2021 and obstructing U.S. government efforts to retrieve them.

While the two cases have similarities, there are also some notable differences.

The White House said Biden’s attorneys found a small number of classified documents and turned them over after discovery.

Trump resisted doing so until a 2022 FBI search turned up about 100 classified documents, leading to obstruction of justice charges against Trump and two employees at his Mar-a-Lago resort.

Hur, who served in senior roles at the Justice Department during the Trump administration, was appointed in January 2023 to oversee the investigation.

Attorney General Merrick Garland, who was nominated by Biden, put Hur in charge of the investigation to give the probe a degree of independence from the leadership of the Justice Department.

Hur’s investigators interviewed Biden in October as part of his probe. The White House has said Biden and his team have cooperated with the investigation.

Biden cannot face federal criminal charges as a sitting president under a longstanding Justice Department policy.

The findings could pose political headaches for Biden who has sought to draw a contrast with Trump on issues of personal ethics and national security.

Hur’s report, and his decision not to bring criminal charges, are likely to fuel accusations of a double standard from Trump and his Republican allies.

Trump was charged after prosecutors said he refused for months to turn over boxes containing presidential records he had taken to his Mar-a-Lago resort and took steps to conceal the documents after the U.S. government demanded their return. An FBI search in August 2022 turned up more than 100 classified documents on the property, prosecutors alleged.

Trump has pleaded not guilty and accused prosecutors of political motivations. A trial is scheduled for May but is likely to be delayed.

Biden’s lawyers have said they notified the National Archives after finding a “small number” of classified documents in his office at the Penn Biden Center for Diplomacy and Global Engagement in November 2022, prompting a federal investigation. Additional documents were later found in a garage and library at Biden’s Delaware home and turned over to the Justice Department.

Biden faced criticism at the time for delays in notifying the public about the discoveries.