WASHINGTON — In a rare retreat, President 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, Mr. 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.”

I met with the DOJ concerning the declassification of various UNREDACTED documents. They agreed to release them but stated that so doing may have a perceived negative impact on the Russia probe. Also, key Allies’ called to ask not to release. Therefore, the Inspector General.....

....has been asked to review these documents on an expedited basis. I believe he will move quickly on this (and hopefully other things which he is looking at). In the end I can always declassify if it proves necessary. Speed is very important to me - and everyone!

Less than a week ago, Mr. 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 on 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 F.B.I. reports about the bureau’s interviews with Bruce G. 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 the former F.B.I. officials James B. Comey and Andrew G. McCabe, and by three department employees: Peter Strzok, Lisa Page and Mr. Ohr.

Through much of the past week, intelligence officials had been pushing back at Mr. Trump’s order, warning that sources and methods could be revealed, according to American officials briefed on the intelligence agencies’ concerns. Those worries eventually flowed back to the White House, and Mr. Trump relented from his first declaration that the communications would be released unredacted. It was a rare win for an intelligence community that has often had to accede to Mr. Trump’s demands.

Ordering the release of the documents had been a cause célèbre for Mr. 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 Mr. Trump.

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

In his tweets, Mr. Trump said that 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 American official and a former British official, the British government expressed grave concerns to the United States government about the release of classified information. The material includes direct references to conversations between American 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 Mr. 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 Mr. Page. Mr. Trump and his Republican allies have claimed that law enforcement officials misled the court to get that permission.

The president’s declassification order on 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 Mr. Trump’s order would make more of the application available to the public.

Mr. 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 on Friday, Mr. Trump also appeared to pull back on his demands for the release of text messages from officials, including Mr. Comey, the former F.B.I. director, and his deputy, Mr. McCabe.

Text messages between two former F.B.I. officials, Lisa Page and Mr. Strzok, have revealed conversations that were critical of Mr. Trump. Allies of the president have said they believe that the release of more text messages would show bias against Mr. 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.

Mr. Trump’s original declassification order put intelligence officials, including from the Justice Department and the F.B.I., 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.

Mr. Trump decided to reverse course after talks with intelligence officials, including Rod J. 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 F.B.I. 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.

A version of this article appears in print on , on Page A14 of the New York edition with the headline: In a Reversal, Trump Pulls Back From Declassifying Russia Documents. Order Reprints | Today’s Paper | Subscribe