The National Archives and the Justice Department tried and failed repeatedly for more than a year and a half to retrieve classified and sensitive documents from former President Donald Trump before resorting to a search of his Mar-a-Lago property this month, according to government documents and statements by Trump’s lawyers.

The documents, including an unsealed, redacted version of an affidavit from the Justice Department requesting a warrant to conduct the search, make clear the lengths to which the government went before pursuing a law enforcement action to recover the material.

Here’s a timeline of the events that led to the search.