President Donald Trump is no longer pushing to include a citizenship question on the 2020 census, averting what legal experts say would have raised thorny constitutional and legal issues.

Instead, Trump issued an executive order Thursday that directs other federal agencies and departments to provide documents and data to the Commerce Department in order to come up with citizenship data through other means.

“We are not backing down on our effort to determine the citizenship status of the United States population,” Trump said on a stormy afternoon in the Rose Garden. Trump said the Census Bureau estimates that using these previously available federal records could determine citizenship for at least 90 percent of the country.

“With today’s executive order, which eliminates long-standing obstacles to data-sharing, we’re aiming to count everyone,” Trump said.

The move followed days of rumors and conflicting messages from within the administration that Trump would take some kind of executive action to try to force the inclusion of a citizenship question on the next census.

“From the very beginning, all the legal options that were being explored and all the possible ways that we could get the information that we need, was always within the confines of the Supreme Court’s decision,” a senior administration official tells TIME. “There was never going to be an option that would be pursued that would fall outside the four corners of what they had ruled.” The official said the White House counsel’s office, the Justice Department and the Commerce Department were all involved in crafting Thursday’s response.

Trump’s capitulation comes two weeks after the Supreme Court temporarily barred the administration from including a citizenship question on the 2020 census, after lower federal courts had issued injunctions against the administration on the issue. The administration’s rationale for including the question “seems to have been contrived,” the Supreme Court wrote in the splintered decision, the crucial section of which was decided by a 5-4 vote, with Chief Justice John Roberts joining the liberal justices.

“We are presented, in other words, with an explanation for agency action that is incongruent with what the record reveals about the agency’s priorities and decision-making process… If judicial review is to be more than an empty ritual, it must demand something better than the explanation offered for the action taken in this case.”

After the Supreme Court’s decision, Trump and Attorney General William Barr, who appeared alongside him at Thursday’s Rose Garden announcement, continued trying to find a way to add the question, and sought to replace the legal team who had been working on the case. Two federal judges have since rejected their attempts to replace the lawyers.

“The Supreme Court ultimately affirmed our right to ask the citizenship question,” Trump said Thursday, “but the Supreme Court also ruled that we must provide further explanation that would have produced even more litigation and considerable time delays.”

The delays would have been caused in part by the current injunctions against adding the question. “An executive order is not valid if it violates federal law or a federal court order,” says Terri Ann Lowenthal, a longtime expert on the census. Given the multiple federal injunctions and the Supreme Court ruling, she says, “I don’t see a way at this juncture that any order the president issues [would] hold up.”

The other important questions about what action Trump could have taken have to do with Congress’s authority over the census and the laws over how the legislative body has delegated that power. In Article I, Section 2, the Constitution empowers Congress to carry out the census in “such manner as they shall by Law direct.”

“The president doesn’t have the ability to unilaterally alter the census,” says Thomas Wolf, Counsel with the Democracy Program at the Brennan Center for Justice and whose work focuses on the census.

As is common practice, Congress has delegated some of its authority to run the census to the Commerce Department in the executive branch. But that power is in turn governed by federal laws, including the Administrative Procedure Act, which is the law that the Supreme Court and the lower courts decided the Trump administration had violated in its move to include a citizenship question. Any new rationale for including the question would likely also have had to be litigated under this law, especially after Roberts and the liberal justices on the Supreme Court didn’t buy the stated reason last time.

“The Trump administration is in a bind that it’s not going to be able to escape on the substance of the justification for a citizenship question,” says Wolf.

Critics of including a citizenship question on the census for the first time since 1950 worried that its inclusion could result in minority populations being under-counted. Now that it seems the question won’t be included in 2020, “There will still be a lot of communications work to do to convince folks that it’s OK to actually fill out the census,” says Justin Levitt, a professor at Loyola Law School who formerly worked in the Civil Rights Division of the U.S. Department of Justice. “But not having a toxic question involved will make all of that easier.”

Write to Tessa Berenson at tessa.berenson@time.com.