Justice Department attorneys promised a federal judge Wednesday that the White House will not destroy records of President Trump’s calls and meetings with foreign leaders while the court weighs a lawsuit brought by historians and watchdog groups.

In a two-page filing, Justice Department lawyer Kathryn L. Wyer told a judge in Washington that the Trump administration and executive office of the president “voluntarily agree . . . to preserve the material at issue pending” litigation.

The filing came after U.S. District Judge Amy Berman Jackson of Washington on Tuesday set a 3 p.m. deadline for the government after the suing groups requested a temporary restraining order in a lawsuit filed in May to compel the administration to comply with the federal Presidential Records Act.

Three organizations — government watchdog groups Citizens for Responsibility and Ethics in Washington (CREW) and the National Security Archive, and the Society for Historians of American Foreign Relations (SHAFR) — alleged that the White House was failing to create and save records as required of Trump’s meetings and communications with foreign leaders.

The lawsuit preceded the current storm surrounding a House impeachment inquiry into the White House, which was triggered by a July 25 phone call in which Trump asked his Ukrainian counterpart to investigate unsubstantiated corruption allegations against former vice president Joe Biden, a leading 2020 Democratic presidential candidate, and his son Hunter Biden.

However, the plaintiffs Tuesday asked Jackson for an emergency order, saying an intelligence community whistleblower’s complaint and the White House’s subsequent comments exposed record-keeping practices “specifically designed to conceal the president’s abuse of his power,” CREW said in a statement.

“It has become increasingly evident that this president has no respect for legally required record-keeping if he thinks the record could make him look bad — or worse, reveal wrongdoing,” CREW Executive Director Noah Bookbinder said.

The Justice Department has moved to dismiss the lawsuit, saying appeals courts have precluded courts from weighing in on presidents’ compliance with the archiving law, “not to mention the President’s broad authority to negotiate with foreign leaders.”

“This long-standing bar on judicial review of the President’s records creation, management, or disposal decisions, and of his day-to-day record keeping practices, requires dismissal” of the case, the government argued.

However, without conceding their arguments for dismissal, Wyer on Wednesday said the government had “instructed relevant personnel to preserve the information” sought by the suing groups.

They include records of communications with foreign leaders; record-keeping policies and practices; White House or agency investigations into such matters; White House communications about such matters to other executive branch components; related legal instruction or guidance; and efforts to return, “claw back” or “lock down” such records.

The suing groups allege that the White House and other executive branch officials have mismanaged records of politically sensitive Trump conversations. They cited reports that Trump has met several times with Russian President Vladimir Putin with no note takers present or official U.S. record created, and that Trump “confiscated” a State Department interpreter’s notes after another meeting. They also cited a Trump meeting with North Korean leader Kim Jong-Un in Vietnam with only two interpreters present, where no official record was created.

The absence of records threatens “real, incalculable harm” to national security and effective foreign policy by depriving policymakers and historians of a documentary record of actions taken under federal law, the groups argued.

The Ukrainian call “adds to a troubling pattern of administration attempts to conceal from Americans important information about what their president has said and done on their behalf,” SHAFR President Barbara Keys said, adding, “The restraining order aims simply to ensure that records ultimately owned by the American people are not torn up, misfiled or not created in the first place.”