The IRS has less than 30 days to detail under oath and in writing the circumstances surrounding the disappearance of former official Lois Lerner’s emails and to summarize options to recover the messages, a federal judge ruled.

Judicial Watch, a non-partisan watchdog group, has sought the documents from the Internal Revenue Service since last year as part of its ongoing lawsuit under the Freedom of Information Act. The judge gave the IRS no more than 30 days, or until Sept. 10, to comply with the order.

Part of a greater compromise, the ruling handed down Thursday by Judge Emmet Sullivan of the U.S. District Court in Washington allows Judicial Watch to access the documents and limits the exposure to the scandal involving IRS targeting  of conservative groups. Originally, Judicial Watch requested that IRS officials testify under oath, The Hill newspaper reported.

In a separate decision Friday afternoon, another federal judge demanded that the IRS provide additional information on Lerner’s missing emails. Ruling in a lawsuit brought by True the Vote, one of the targeted groups, District Court Judge Reggie Walton ordered the tax agency to explain the disappearance, Fox News reported.

>>> Transcript: Issa Invokes Nixon in Obama’s ‘Slow Down’ Approach to IRS Probes

In the Judicial Watch case, Judge Sullivan ordered the IRS and the watchdog group to work cooperatively with another federal judge to recover Lerner’s emails, which IRS officials have said were destroyed when a computer hard drive crashed.

Judicial Watch President Tom Fitton called the decision  “a victory for public accountability.” Fitton expressed optimism about eventual recovery of emails, calling Judge John Facciola “an expert in e-discovery.”

The watchdog group previously had said the Lerner emails “could be critical to getting to the bottom of the IRS scandal where tea party and other conservative group applications were illegally delayed by the IRS.”