U.S. District Judge Emmet G. Sullivan gave the tax agency a month to submit the explanation in writing. Sullivan said he is also appointing a federal magistrate to see whether the lost emails can be obtained from other sources.
Sullivan issued the order as part of a Freedom of Information Act lawsuit by Judicial Watch, a conservative watchdog group. He said the IRS declaration must be signed, under oath, by the appropriate IRS official.
"I'm going to hold tight to that Aug. 10 declaration," Sullivan said.
The IRS says it lost the emails in 2011 when Lois Lerner's computer crashed. At the time, Lerner headed the IRS division that processes applications for tax-exempt status. She has since retired.