Lawmakers blasted the Internal Revenue Service this week for deleting records that a federal judge had ordered the agency to produce.

First, Sens. Orrin Hatch and Ron Wyden demanded to know why a hard drive had been "sanitized" after a court ordered the IRS to hand over records from that computer.

In a letter to IRS Commissioner John Koskinen Wednesday, the pair of Republicans questioned the tax agency's record-keeping policies, which have come under fire for years thanks to a series of lengthy congressional investigations that were stymied by the IRS' failure to turn over key documents.

"For unknown reasons, the hard drive in question was not recycled, and in December of [2014] a FOIA request was issued that may have pertained to documents on the hard drive," Hatch and Wyden wrote of the wiped hardware. "In April 2015, the IRS subsequently 'sanitized' the hard drive, in potential violation of IRS procedure and the relevant litigation hold."

A day later, Reps. Jason Chaffetz and Jim Jordan sent their own letter to Koskinen, this one recognizing the agency's long history of losing or erasing documents sought by investigators.

"It is stunning to see that the IRS still does not take reasonable care to preserve documents that it is legally required to protect," the Republican congressmen wrote in their letter Thursday.

The lawmakers were referring to a Freedom of Information Act lawsuit filed by Microsoft over the IRS' decision to hire an outside law firm, Quinn Emanuel, in a $2.2 million contract to help tax agents audit the company.

Although the IRS erased the hard drive of an employee involved in the audit in April 2015, the agency did not disclose the loss of key records until Jan. 15.

The news emerged as the latest blow to the credibility of IRS record-keeping practices, which Republicans blamed for their inability to uncover crucial details of a targeting scandal in which tax agents singled out Tea Party nonprofits for extra scrutiny.

Chaffetz and Jordan likened the development in the Microsoft case to the now-infamous destruction of 422 back-up tapes containing the emails of Lois Lerner, former head of the IRS' tax-exempt unit.

Tax officials wiped those tapes "in spite of the existence of a preservation order, a non-destruction order from the Department of Justice and a congressional subpoena," the congressmen wrote.

Led by Chaffetz, who chairs the House Oversight and Government Reform Committee, House Republicans moved to impeach Koskinen in October after he misrepresented the IRS' search for documents that had already been deleted.