President Donald Trump announced Thursday that he is backing off his effort to include a citizenship question in the 2020 census and instead issuing an executive order directing departments and agencies to better share data related to the number of citizens and non-citizens in the country.

“We have great knowledge in many of our agencies," Trump said. "We will leave no stone unturned.”

The order will eliminate "longstanding obstacles" to data sharing, the president said, and allow the administration to combine that data with the information from the 2020 census questionnaire to create a more accurate count than in the past.

ABC News first reported Trump's expected announcement. The news conference planned for Thursday comes as two federal judges refused to let the Department of Justice withdraw lawyers from a lawsuit over the Trump administration's plans to put the citizenship question on the 2020 census form.

The administration is currently printing census forms without the question after the Supreme Court ruled late last month that Commerce Secretary Wilbur Ross, who stood alongside Trump during his announcement on Thursday, did not provide an adequate reason for why the question was necessary.

Attorney General Bill Barr, who also spoke at the new conference Thursday, said the Supreme Court's decision effectively closed off the possibility of successfully litigating the issue without jeopardizing the ability to carry out the census on time.

It “was a logistical impediment, not a legal one,” Barr said.

Last week, Trump told reporters on the White House South Lawn when asked if he would issue an executive order to include the question on the census: "We're thinking about doing that."

"It's one of the ways," he added. "We have four or five ways we can do it. It's one of the ways and we're thinking about doing it very seriously."

The Commerce Department already gathers information about citizenship from other government agencies. Congress now requires the Census Bureau to collect citizenship data through what's known as the American Community Survey, which samples about 2 percent of households every year. That information is combined with data the bureau gets from other agencies.

Because proof of citizenship is required get a passport, a job, or government benefits, other agencies have data that can be used to estimate citizenship, and the Census Bureau relies heavily on information from the Social Security Administration. Some state data files are consulted as well, along with military records and information from the Department of Homeland Security.

Opponents of putting the question on the census form itself -- the short form that goes to every household -- have said that non-citizens tend not to respond, making that method of determining citizenship unreliable.

Democrats and immigrant rights groups also have argued that the real purpose of the citizenship question was to prevent immigrants from filling out the form and thus produce political gains for Republicans.

At her weekly press conference Thursday, House Speaker Nancy Pelosi announced the House will vote next week to hold Ross and Attorney General William Barr in criminal contempt for their role in the development of the citizenship question on the census.

On Tuesday, Sens. Brian Schatz, D-Hawaii, and Jack Reed, D-R.I., asked Ross and Attorney General William Barr in a letter to "immediately cease consideration of an executive order or any other means of adding a citizenship question and instead take all necessary steps to ensure an on-time Decennial Census."

"The notion that the Administration is seeking a new rationale to add a citizenship question after Chief Justice Roberts characterized its previous position as 'contrived' is deeply disturbing," the senators wrote. "It strains credulity that the Administration could come up with a new rationale that wouldn't be similarly flawed and disingenuous at this late date."

Meanwhile, the press conference came at the conclusion of another event that's drawn considerable attention in recent days, the president's planned social media summit. Trump hosted several right-wing internet personalities to "share how they have been affected by bias online" as Republicans for months have blasted social media companies for what they see as unfair censorship of their views online.

Trump went on an extended tweetstorm Thursday as he hyped the event.

"A big subject today at the White House Social Media Summit will be the tremendous dishonesty, bias, discrimination and suppression practiced by certain companies," he wrote. "We will not let them get away with it much longer. The Fake News Media will also be there, but for a limited period."