The US House has voted to hold two top Trump administration officials in contempt of Congress for failing to comply with subpoenas related to a decision to add a citizenship question to the 2020 census.

The House voted, 230-198, on Wednesday to hold the attorney general, William Barr, and the commerce secretary, Wilbur Ross, in criminal contempt. The vote is largely symbolic because the justice department is unlikely to prosecute them.

The action marks an escalation of Democratic efforts to use their House majority to aggressively investigate the inner workings of the Trump administration.

Lawmakers say Barr and Ross refused to hand over key documents shedding light on the administration’s push to include the question about US citizenship on the 2020 census, after Donald Trump asserted executive privilege over them.

Democrats have been trying to learn the motives behind the administration’s efforts, particularly since it was revealed that the now deceased mastermind of the Republican gerrymander, Thomas Hofeller, had studied the citizenship question in Texas and concluded it would be “advantageous to Republicans and non-Hispanic whites”.

Trump last week abandoned his bid to inject a citizenship question into the census, after the supreme court said the administration’s justification for the question seemed “to have been contrived”. Instead, Trump directed several federal agencies to try to compile the information using existing databases.

Ross said earlier in the day that the vote was nothing more than “political theater” intended to embarrass and harass the Trump administration.

“Holding the attorney general in contempt for working in good faith with Congress marks a new low for Speaker Pelosi’s House of Representatives,” said Kerri Kupec, a spokesperson for the Department of Justice, following the vote. “This vote is nothing more than a political stunt.”

Elijah Cummings, the chairman of the House committee on oversight and reform, defended the move. “The Departments of Justice and Commerce have been engaged in a campaign to subvert our laws and the processes Congress put in place to maintain the integrity of the census,” he said in a statement. “The resolution before us today is about protecting our democracy. We need to understand how and why the Trump administration tried to add a question based on pretext so that we can consider reforms to ensure that this does not happen again.”