The House voted Wednesday to hold Attorney General William Barr and Commerce Secretary Wilbur Ross in criminal contempt of Congress for obstructing a probe into the administration's failed bid to add a citizenship question to the 2020 census.

The criminal contempt resolution passed by a vote of 230-198. It passed along party lines — no Republicans voted in favor. Rep. Justin Amash of Michigan, now an independent after leaving the GOP earlier this month, voted in favor of the move.

Four Democrats voted against it — Reps. Anthony Brindisi of New York, Jared Golden of Maine, Conor Lamb of Pennsylvania and Jefferson Van Drew of New Jersey.

White House press secretary Stephanie Grisham blasted the vote as "ridiculous and yet another lawless attempt to harass the President and his Administration."

"House Democrats know they have no legal right to these documents, but their shameful and cynical politics know no bounds," she said in a statement.

The House scheduled the vote after Barr and Ross withheld documents that had been subpoenaed by the Oversight and Reform Committee as part of its probe into the origins of the now-scuttled citizenship question.

"I do not take this decision lightly," Oversight chair Elijah Cummings said on the House floor before the vote. "Holding any secretary in criminal contempt of Congress is a serious and sober matter, one that I have done everything in my power to avoid. But in the case of the Attorney General and the secretary, Secretary Ross, they blatantly obstructed our ability to do congressional oversight into the real reason Secretary Ross was trying for the first time in 70 years, in 70 years to add a citizenship question to the 2020 census."

Barr and Ross sent a joint letter to House Speaker Nancy Pelosi calling it "unfortunate" that the House would go ahead with a contempt vote "regarding a citizenship question that, as you know, will not be asked on the 2020 Census questionnaire."

"It is unfortunate that the House has scheduled a vote to hold two sitting members of the President's Cabinet in contempt of Congress given the clear record of cooperation," their letter said.

Ross had testified before Congress that he added the question "solely" because of a request from the Department of Justice, but it later emerged he'd asked the department to make the request, and that he and administration officials had been discussing adding the question for months.

The administration had argued publicly and in court that the question was aimed at helping enforce the Voting Rights Act, but the contempt resolution notes the idea had initially been promoted by a now-deceased Republican gerrymandering expert, Thomas Hofeller. Hofeller "wrote a secret study concluding that counting voting-age citizens, rather than total population, in legislative districts 'would be advantageous to Republicans and Non-Hispanic Whites,'" the resolution says.

Barr and Ross maintain they've tried to comply with the Oversight Committee's investigation, but the resolution charges the pair have obstructed it by failing to turn over key documents. Barr also blocked a Justice Department employee from answering 150 questions about the process.

If the resolution passes the Democratic-controlled House as expected, it would be just the second time in American history that an attorney general had been found in criminal contempt — and the second time in seven years. In 2012, the Republican-controlled House found then-Attorney General Eric Holder in contempt for failing to turn over subpoenaed documents.

It would be the first time a commerce secretary had been found in contempt.

If the resolution passes, it would then be sent to the U.S. attorney's office in Washington, D.C., for further action. While the finding can carry stiff penalties — up to a year behind bars and a $100,000 fine — it's unlikely the U.S. attorney's office will rush to take action. It's overseen by Barr.

The Obama Justice Department declined to pursue a criminal charge against Holder, and the contempt case against him wound up slogging through the court system for years. It quietly settled earlier this year.

The resolution also contains a plan B — it authorizes the House to seek a court order enforcing the subpoenas.

Republican Rep. Mark Meadows of North Carolina, who's on the Oversight Committee, decried the move.

"Holding someone in contempt of Congress is one of the most serious and formal actions our committee can take. It should not be used as a political tool to generate press as part of an election year witch-hunt," Meadows told Cummings on the House floor.

Democrats said it's important to take a stand.

"Look, if you act with contempt for Congress and the American people, then you should be held in contempt of Congress and the American people, that's pretty clear to me. We've never seen anything like this systemic defiance of the Congress by the president before," Rep. Jamie Raskin, D-Md., told NBC News.

Rep. Pramila Jayapal, D-Wash., said, "We have to use every tool in our toolbox, including the legal tools that we have."

Ross dismissed the impending vote in an interview with Fox Business Network on Wednesday morning.

"Oh, this is just more political theater. It doesn't really have any substantive basis," he said.

"We produced to the committee over 14,000 pages of documents. What's at issue here is about a dozen documents, roughly 15 pages, all of which the courts didn't find necessary to make their conclusion. So this is silly."

He also insisted that "We are not stonewalling. But we are also not yielding on the very, very important matter of executive privilege. These are privileged documents."

Barr and Ross announced last week they were dropping their bid to add the citizenship question in the wake of a Supreme Court decision last month that their justification for the question was "contrived."