The House Oversight Committee voted Wednesday to hold Attorney General William Barr and Commerce Secretary Wilbur Ross in contempt for failing to turn over documents about a citizenship question the Trump administration wanted added to the census.

Following the 24 to 15 vote, the matter will be referred to the full House, which Democrats control.

President Trump on Wednesday defended the new citizenship question as well as his decision to withhold documents on the issue from Congress.

During an appearance with Polish President Andrzej Duda, Trump insisted that the new question was essential.

“It is totally ridiculous that we would have a census without asking. I think when a census goes out, you should find out whether or not — and you have the right to ask whether somebody is a citizen of the United States,” he said.

In a letter to the committee’s chair, Maryland Rep. Elijah Cummings, the Justice Department asserted that the Trump administration had “engaged in good-faith efforts” to satisfy the committee’s oversight needs and that the contempt vote was premature.

But Democrats fear the question will reduce census participation in immigrant-heavy communities — and some lashed out at Team Trump for stonewalling Congress’ oversight efforts.

“This does not appear to be a good faith effort at negotiation,” Cummings said in an opening statement at the panel’s meeting.

Rep. Alexandria Ocasio-Cortez (D-Bronx/Queens) said the census was “one of the most vital and sensitive things we do” and that the change would hurt minority and immigrant communities.

With Wires