WASHINGTON — President Trump on Wednesday asserted executive privilege to shield documents about the administration’s decision to add a citizenship question to the 2020 Census, a move meant to try to undercut an expected vote by a House panel to hold his attorney general and commerce secretary in contempt for failing to turn over the materials to lawmakers.

Attorney General William Barr had a day earlier warned the House Oversight Committee that if it moved toward holding him in contempt, he would ask Trump to assert privilege to protect the materials. The committee, though, rejected his offer, and was preparing to vote Wednesday on a contempt finding when Trump followed through on Barr’s threat.

The department revealed the assertion in a letter to the committee, which called the contempt vote “unnecessary and premature.”

In the Justice Department’s view, the privilege assertion undercuts the contempt finding, because it prevents the attorney general from turning over materials lawmakers had subpoenaed.

But the Oversight Committee is expected to hold Barr and Commerce Secretary Wilbur Ross in contempt anyway. Unless they later work out a deal with the Justice Department, the court system will ultimately decide which documents lawmakers are entitled to see.

The Justice Department and the Oversight Committee are essentially on the same trajectory as the Department and the House Judiciary Committee were last month, when the Judiciary Committee voted to hold Barr in contempt for failing to turn over materials related to now-former special counsel Robert Mueller’s probe.

In that case, though, the Judiciary Committee and the Justice Department later worked out a deal. That contempt process is in “abeyance,” though Democrats have taken steps to make sure they have the ability to sue the department in court.

The expected contempt vote Wednesday would mark a further escalation in the fight between House Democrats and the Republican administration over the investigatory powers of Congress that is playing out in multiple committees and the courts.

Democrats say the larger issue is that the White House is almost completely rejecting congressional oversight – stonewalling requests for documents and blocking witnesses from testifying on various subjects. The administration, meanwhile, argues that Democrats are requesting far more materials than they should legally have access to in an attempt to embarrass the president, and they have been unwilling to negotiate.

If the Oversight Committee contempt resolution is approved by the full House, Chairman Elijah Cummings, D-Md., would be empowered to ask a federal court to order Barr and Ross to comply with subpoenas that sought documents related to the 2020 Census decision and testimony from a senior Justice Department official.

Democrats have already gone to federal judges in Washington and New York to seek enforcement of subpoenas targeting Trump’s financial records in the possession of private companies. They have scored initial wins in trial courts, but appeals are likely to play out over the coming months.

The Oversight Committee authorized Cummings in April to issue subpoenas to Barr and Ross for documents related to the Census decision and for a deposition of John Gore, principal deputy assistant attorney general.

But the Justice Department said it would not comply with the subpoena for Gore to testify. In a letter last week to Barr, Cummings cited the attorney general’s “unprecedented order” to Gore to defy the subpoena as part of the reason for the contempt votes.

Democratic lawmakers have accused the Trump administration of stonewalling their efforts to investigate Ross’s March 2018 decision to add the citizenship question, which the government says it needs to better enforce the Voting Rights Act.

In a statement last week, the Commerce Department noted that Ross has previously testified before the committee and that the department has turned over nearly 14,000 pages of documents to the panel.

Opponents of the citizenship question have argued that it will suppress responses to the survey among immigrant communities, resulting in an undercount in the areas where they live.

The population count from the Decennial Census is used to allocate $800 billion a year in federal funding and determine congressional representation and redistricting.

A key issue in the challenges to the citizenship question is how it came to be added. Ross originally told Congress that his decision to add it came solely in response to a December 2017 request from the Justice Department, but lawsuits later produced emails showing that Ross, who oversees the Census Bureau, had been pushing for the question for months before that.

In March of this year, Democrats on the Oversight Committee grilled him about it extensively, with several asking whether he had lied under oath, and one demanding his resignation.

The committee also met with Gore that month on the matter, but Cummings said he refused to answer more than 150 questions, citing ongoing litigation.

Three federal judges have struck down the Census question, saying Ross’ actions in adding it were in violation of the Administrative Procedure Act.

The Supreme Court heard the case April 23. Evidence in the case concluded with oral arguments that day, and it appeared that the conservative majority seemed inclined to agree with the government that the decision to add the question was within the authority of the commerce secretary.

Last month, new evidence emerged suggesting that the citizenship question was crafted specifically to give an electoral advantage to Republicans and whites.

The evidence was found in the files of the prominent Republican redistricting strategist Thomas Hofeller after his death in August. According to lawyers challenging the question, it reveals that Hofeller “played a significant role in orchestrating the addition of the citizenship question to the 2020 Decennial Census to create a structural electoral advantage for, in his own words, ‘Republicans and Non-Hispanic Whites.’ ”

The lawyers also argued that Trump administration officials purposely obscured Hofeller’s role in court proceedings.