The F.B.I. agents who raided the office of President Trump’s personal lawyer on Monday were seeing for records about payments to two women who claim they had affairs with Mr. Trump as well as information related to the role of the publisher of The National Enquirer in silencing one of the women, according to several people briefed on the investigation.
The search warrant carried out by the public corruption unit of the United States attorney’s office in Manhattan sought information about Karen McDougal, a former Playboy model who claims she carried on a nearly yearlong affair with Mr. Trump shortly after the birth of his youngest son in 2006. Ms. McDougal was paid $150,000 by American Media Inc., The Enquirer’s parent company, whose chief executive is a friend of Mr. Trump’s.
Agents were also searching the office and hotel room of the lawyer, Michael D. Cohen, for information related to Stephanie Clifford, better known as Stormy Daniels, a pornographic film actress, who also said she had sex with Mr. Trump while he was married. Mr. Cohen has acknowledged that he paid Ms. Clifford $130,000 as part of a nondisclosure agreement to secure her silence days before the 2016 presidential election.
The president, who reacted to news of the raids on Monday by lashing out at his top law enforcement officials, described the investigations in a Twitter post on Tuesday as “A TOTAL WITCH HUNT!!!” and later declined to respond to reporters’ questions. But Sarah Huckabee Sanders, the White House press secretary, refused to say that Mr. Trump retains confidence in his attorney general, deputy attorney general or F.B.I. director. She also said that Mr. Trump “believes he has the power” to fire Robert S. Mueller III, the special counsel in the Russia inquiry, a position directly contradicted by federal regulations.
Stephen Ryan, Mr. Cohen’s lawyer, said that it was Mr. Mueller who referred evidence to the federal authorities in New York who carried out Monday’s raids. In an email on Tuesday, Mr. Ryan repeated his assertion that the raids were “inappropriate and unnecessary.”
Mr. Trump has been dogged for months by accusations that women with whom he is said to have had affairs were paid to keep quiet before the election — charges that the White House has repeatedly said he denies.
Ms. McDougal has claimed that she had a 10-month consensual affair with Mr. Trump 12 years ago. American Media, which is owned by David J. Pecker, agreed to pay Ms. McDougal $150,000 for the rights to her story in August 2016, but did not publish it in a practice known as catch and kill. Ms. Clifford, who told her story about an affair with Mr. Trump to CBS’s “60 Minutes” last month, is aggressively challenging the nondisclosure agreement she agreed to in October 2016, receiving $130,000 in return.
It is unclear exactly why the New York investigators are examining the payments. But critics of the president have claimed that they amount to illegal campaign contributions because they assisted Mr. Trump win the White House by suppressing politically damaging stories.
The F.B.I. also searched for records related to Mr. Cohen’s New York taxicab business, apparently a separate line of inquiry unrelated to Mr. Trump. Mr. Cohen is a longtime owner of taxi medallions, at one point operating a fleet of more than 200 cabs in Manhattan.
Besides enraging Mr. Trump, the early-morning searches, associates said, also led him to privately wonder whether he should fire Rod J. Rosenstein, the veteran prosecutor appointed by Mr. Trump to serve as deputy attorney general. Mr. Rosenstein personally signed off on Monday’s F.B.I. decision to raid the office of Mr. Cohen, several government officials said.
Justice Department regulations require prosecutors to consult with senior officials in Washington, but not necessarily the deputy attorney general, before conducting a search of a lawyer’s files, which is among the most delicate steps federal prosecutors can take in an investigation.
Mr. Trump has long been mistrustful of Mr. Rosenstein, who appointed Mr. Mueller, and now oversees his investigation. In his remarks on Monday night, the president lashed out at Mr. Rosenstein for having “signed a FISA warrant,” apparently a reference to the role Mr. Rosenstein played in authorizing the wiretap of a Trump associate in the Russia inquiry.
Mr. Trump considered firing Mr. Rosenstein last summer. Instead, he ordered Mr. Mueller to be fired, then backed down after the White House counsel refused to carry out the order, The New York Times reported in January.
As Mr. Trump has stewed over the developments, he has cast blame in many directions. Privately, people close to the president said, he has blamed Mr. Cohen for acknowledging the payments to Ms. Clifford.
On Monday evening, Mr. Trump called the court-authorized raids an “attack on our country” — unusually harsh language that he has not utilized to describe Russia’s attempts to influence an American election through hacking and propaganda — and the raids are likely to complicate Mr. Trump’s negotiations with Mr. Mueller over the terms of a probable interview.
Mr. Trump’s lawyers have warned that such an interview would be incredibly risky, but Mr. Trump had been confident in his ability and was eager to sit for one. People close to the president said the raids could change that thinking.
The president’s reaction has deeply unsettled aides, present and former Justice Department officials and lawmakers from both parties, who believe the president, may use the raids as a pretext to purge the team leading the Russia investigation.
“Now is the time for officials in the executive branch and Congress who care about the rule of law to counsel against any effort to undermine the special counsel’s work,” said David Laufman, a former top Justice Department official who oversaw the Russia investigation before Mr. Mueller’s appointment.
Mr. Trump’s advisers have spent the past 24 hours trying to persuade the president not to make an impulsive decision that could put him in more legal jeopardy, several people close to Mr. Trump said. In one of his Tuesday morning tweets, he vented that “attorney-client privilege is dead!”
Adding to the concern among Mr. Trump’s aides about his mood is the release next week of a book by James B. Comey, the former F.B.I. director, which is expected to be sharply critical of the president.
The involvement of Mr. Rosenstein and top prosecutors in New York in the raids of Mr. Cohen’s office and hotel room makes it harder for Mr. Trump to argue that his legal problems are the result of a witch hunt led by Mr. Mueller. In addition to Mr. Rosenstein, all of the top law enforcement officials involved in the raids are Republicans, including Mr. Mueller and Christopher A. Wray, Mr. Trump’s choice to succeed Mr. Comey as director of the F.B.I.
Geoffrey Berman, the interim United States attorney for Southern District of New York, which oversaw the raids, has been recused from the case, according to one person with knowledge with the matter. The precise reason was not clear, but under Justice Department guidelines, a United States attorney must report any issue that could need recusal “as a result of an actual or apparent conflict of interest.”
Mr. Berman, who worked as a volunteer lawyer on Mr. Trump’s campaign, was the choice of Donald F. McGahn II, the White House counsel, to be the United States attorney in New York, according to a person with direct knowledge of the appointment.
While Mr. Trump is focused for the moment on Mr. Rosenstein, many of the president’s advisers and allies are fearful that the president also intends to fire Mr. Mueller in an attempt to end the Russia investigation. Asked by reporters on Monday night whether he intends to do so, Mr. Trump said, “We’ll see what happens.”
Despite Tuesday’s assertions by Ms. Sanders, many legal experts believe the president cannot fire Mr. Mueller himself, and would have to direct Mr. Rosenstein to do so. Mr. Rosenstein has told Congress that he would dismiss Mr. Mueller only for cause, and people close to Mr. Rosenstein have indicated that he would resign if he were ordered to fire Mr. Mueller by the president.
Bipartisan legislation has been introduced to protect Mr. Mueller, with senators urging Mr. Trump to let the inquiry go forward “without impediment.” Republican leadership has dismissed such legislation as unnecessary.
The prospect that Mr. Trump might still find a way to fire Mr. Mueller elicited angry responses from Congressional Democrats and some Republicans, who warned that such a move would be disastrous for the White House.
Senator Charles E. Grassley, Republican of Iowa and the chairman of the Judiciary Committee, said Tuesday on Fox Business Network that “it would be suicide for the president to want to talk about firing Mueller.”
On Monday, Representative Nancy Pelosi of California, the House Democratic leader, called Mr. Trump’s attacks on Mr. Mueller and his team a “grave reminder of his utter contempt for the rule of law.” Senator Chuck Schumer of New York, the Senate’s top Democrat, urged the president: “Don’t do it, do not go down this path. For the sake of our country, we plead with you.”