Two government watchdog groups on Thursday sued President Donald Trump over his record keeping, accusing the president of violating federal law and the Constitution by destroying presidential records instead of preserving them so they could eventually be made public.

The groups, Citizens for Responsibility and Ethics in Washington and the National Security Archive, filed the lawsuit Thursday morning in federal court in the District of Colombia.

“From early on in this Administration, White House staff have used and…continue to use certain email messaging applications that destroy the contents of messages as soon as they are read, without regard to whether the messages are presidential records,” the suit states.

Trending: Donald Trump's Approval Rating Will Probably Plunge Because of GOP's Senate Health Care Bill

“Presidential statements made on Twitter sent from the President’s personal Twitter account, which are subject to federal record-keeping obligations, have been destroyed.”

The suit also notes that presidential staffers use secret chat apps and encrypted messaging apps like Confide and Signal, which CREW says would violate federal law concerning presidential records.

The White House denied the accusations in the lawsuit. “The White House doesn't permit the use of apps such as this and works diligently to ensure all staff comply with The Presidential Records Act,” a White House official tells Newsweek.

Don't miss: American Police Are Wearing Rompers Now, Because That's A Thing in 2017

The lawsuit says it is important that the records be preserved because they are needed to help to explain the president’s thinking and motives during episodes such as Trump's alleged pressuring of then-FBI Director James Comey to end his probe of Michael Flynn, the former national security advisor, and his later firing of Comey.

“Plaintiffs bring this action at a time when allegations of potential misconduct and questionable decision-making have been leveled against President Donald J. Trump and other, high-level White House officials,” the suit states, adding that Trump’s actions have been questioned as illegal.

Story continues

“These questions can be resolved only through access to contemporaneous records that explain what the President did and why.”

Most popular: Trump Stole His Solar Border Wall Idea From A Veteran Who 'Doesn't Mind Sharing' With POTUS

There was also at least one news report that White House aides purged their phones of potentially compromising information—which would violate the Presidential Records Act, according to the suit.

“The American people not only deserve to know how their government is making important decisions, it’s the law,” CREW Executive Director Noah Bookbinder said in a statement.

“By deleting these records, the White House is destroying essential historical records.”

The suit filed Thursday is not the first time CREW has sued the president. The group also sued Trump earlier this year, accusing him of violating the Constitution by contining to own and profit from his sprawling business empire, according to The New York Times.

More from Newsweek