President Trump is pulling back on efforts to include a question about citizenship on the 2020 census and is instead directing all federal agencies to give the Commerce Department all records regarding the number of citizens and noncitizens in the country, Trump announced Thursday.

"Today, I'm here to say we are not backing down on our effort to determine the citizenship status of the United States population," the president said during remarks in the Rose Garden, confirming earlier reports he would give up on adding the question to the 2020 census.

The Trump administration instead "will utilize these vast federal databases to gain a full, complete, and accurate count of the noncitizen population," Trump said.

The Commerce Department said it wanted to include the citizenship question on the 2020 census to ensure better enforcement of the Voting Rights Act. The Trump administration suffered a string of defeats in the lower courts over its efforts to ask about citizenship, with three federal judges blocking the Commerce Department from doing so.

The Supreme Court in late June said that justification “seems to have been contrived” and blocked the administration from including the question.

Attorney General William Barr, however, suggested Monday there was a new legal path for including the question despite the ruling.

After Trump indicated last week his administration would fight to save the question, the Justice Department sought to change the legal team defending the decision to add it. But two federal judges rejected the administration’s request to do so.

The Commerce Department began printing the census questionnaires without the citizenship question last week.

Attorney General William Barr, who spoke after Trump, insisted that the Justice Department would’ve ultimately prevailed in its quest in court to add the citizenship question to the census, but said he was dropping the effort because DOJ’s victory wouldn’t have happened with enough time before the 2020 census had to be sent out.

Barr said any new effort from DOJ would’ve been met with immediate opposition in the three ongoing cases challenging the administration’s efforts to add the question. And Barr said there were already-existing injunctions that prohibited the question from being swiftly added as well.

“Put simply, the impediment was a logistical impediment, not a legal one,” Barr said. “We simply cannot complete the litigation in time to carry out the census.”

Barr said that the Supreme Court decision had “closed all paths to adding the question to the 2020 decennial census.”

The attorney general praised Trump’s executive order, noting that “including a question on the census is not the only way to obtain this vital information.”

“The course the president has chosen today will bring unprecedented resources to bear on determining how many citizens and noncitizens are in our country and will yield the best data the government has had on citizenship in many decades,” Barr said.