WASHINGTON — In a rare retreat, President Donald Trump on Friday reversed himself and said he was no longer demanding that documents related to the Russia investigation be immediately declassified and released to the public.

Taking to Twitter on Friday morning, Trump said that instead of an immediate release, Justice Department officials would review the documents, adding that “in the end I can always declassify if it proves necessary.”

Less than a week ago, Trump had ordered that law enforcement and intelligence agencies declassify and release the documents, which include text messages about the Russia inquiry, along with other documents related to the surveillance of a former Trump aide.

A White House statement Monday said the president had called for the “immediate declassification” of pages of an application to wiretap Carter Page, his former campaign official, and all FBI reports about the bureau’s interviews with Bruce Ohr, a Justice Department official who had knowledge of the Russia investigation.

It also directed the Justice Department “to publicly release” unredacted text messages relating to the Russia investigation that were sent by former FBI officials James Comey and Andrew McCabe, and by three department employees: Peter Strzok, Lisa Page and Ohr.

Ordering the release of the documents was a cause célèbre for Trump’s most fervent supporters on Capitol Hill and at conservative media outlets, who have for months been claiming that the release of the documents would help prove a liberal plot to undermine Trump.

The president’s abrupt reversal could anger those supporters if they view the decision as evidence that Trump exhibited weakness by caving to pressure from within his own administration.

In his tweets, Trump said Justice Department officials had agreed to release the unredacted documents, but had also warned of what the president called “a perceived negative impact on the Russia probe.” The tweet did not explain further.

The president also said in the tweet — without elaboration — that “key Allies” had called to urge him not to declassify the documents.

According to a former U.S. official and a former British official, the British government expressed grave concerns to the U.S. government about the release of classified information. The material includes direct references to conversations between U.S. law enforcement officials and Christopher Steele, the former British spy who compiled a dossier alleging ties between the Trump campaign and Russia.

Britain’s objection, these former officials said, was over revealing Steele’s identity in an official document, regardless of whether he had been named in press reports.

Some of the documents at issue involve the beginnings of the Russia investigation, when law enforcement officials submitted an application seeking permission from the secretive Foreign Intelligence Surveillance Court to wiretap Page. Trump and his Republican allies have claimed that law enforcement officials misled the court to get that permission.

The president’s declassification order Monday called on law enforcement officials to release about two dozen pages from the surveillance application. Much of the application has already been released, but Trump’s order would make more of the application available to the public.

Trump and his allies claim it will show that officials misled the court by not disclosing that the application was based in part on the dossier, which they believe should be discredited as a partisan document funded in part by Democrats.

Little evidence has emerged to support those allegations, and Democrats have assailed the Republican efforts to release the documents, saying it is a political effort that could lead to a dangerous release of sensitive national security information.

In his tweet Friday, Trump also appeared to pull back on his demands for the release of text messages from officials, including Comey, the former FBI director, and his deputy, McCabe.

Text messages between two former FBI officials, Lisa Page and Strzok, have revealed conversations that were critical of Trump. Allies of the president have said they believe that the release of more text messages would show bias against Trump within the law enforcement community.

Those documents will now be reviewed by the Justice Department inspector general, Michael E. Horowitz, who will examine them as part of a larger investigation that is underway into the department’s conduct in the Russia investigations.

Trump’s original declassification order put intelligence officials, including from the Justice Department and the FBI, in the uncomfortable position of having to explain to the president the risks of declassifying the materials and making the information public.

A key concern of senior intelligence leaders was protecting the sources and methods that the intelligence community uses to gather information, according to two officials briefed on the matter. Revealing those pieces of information could undermine national security.

Trump decided to reverse course after talks with intelligence officials, including Rod Rosenstein, the deputy attorney general, who engaged in conversations with the president with the aim of informing him of all the ramifications of his order.

The Justice Department and the FBI had been in the process of vetting those materials to redact sensitive information. Declassified court documents and materials released to the public under the Freedom of Information Act often have redactions.

But they feared that the president would push back on the information they wished to redact, or ignore their recommendations and release the material.