WASHINGTON — President Trump angrily declared on Thursday that he was the victim of a witch hunt, and contradicted his deputy attorney general over the firing of the F.B.I. director, in comments that were his most extensive to date about ties between his campaign and Russia.
On another day of head-spinning developments, Mr. Trump said the political storm in the capital was dividing the nation. He also conspicuously distanced himself from aides like his former national security adviser, Michael T. Flynn, in repeating his claim that there was no collusion between his 2016 campaign and Russia.
“I respect the move,” Mr. Trump said of the Justice Department’s decision on Wednesday to appoint a special counsel to investigate the matter. “But the entire thing has been a witch hunt.”
The podcast that makes sense of the most delirious stretch of the 2016 campaign.
“And there is no collusion between, certainly, myself and my campaign — but I can always speak for myself — and the Russians,” he said. “Zero.”
Mr. Trump’s comments were delivered in a chaotic East Room news conference where he stood alongside the president of Colombia, Juan Manuel Santos. As he dug in his heels, Mr. Trump further muddied his explanation of why he dismissed the F.B.I. director, James B. Comey — and in doing so, offered a different version of events from one given to senators just hours earlier by the deputy attorney general, Rod J. Rosenstein.
In that meeting, Mr. Rosenstein outlined his decision to appoint Robert S. Mueller III, a former F.B.I. director, as special counsel. Several senators emerged afterward to say Mr. Rosenstein had told them he was certain that the president was going to dismiss Mr. Comey, even before he wrote a memo critical of the director’s performance.
But at his news conference, Mr. Trump reverted to the White House’s original claim that he was primarily responding to Mr. Rosenstein’s recommendation to dismiss Mr. Comey. The president had later claimed that he had moved against Mr. Comey in part because of his frustration over the F.B.I.’s handling of the Russia investigation.
“Director Comey was very unpopular with most people,” Mr. Trump said on Thursday. “When I made that decision, I actually thought that it would be a bipartisan decision. Because you look at all of the people on the Democratic side, not only the Republican side, that were saying such terrible things about Director Comey.”
There was a palpable sense among the senators who filed out of the briefing room that the center of gravity in the investigation was shifting from Capitol Hill to Mr. Mueller, who will spend weeks assembling a staff and a list of witnesses to interview.
“This pretty much shuts Congress down,” Senator Lindsey Graham, Republican of South Carolina, told reporters. “Democrats, you got what you wanted. You got a special counsel. Now we’ll just move on. We’re not prosecutors.”
The prospect of Mr. Mueller, a former federal prosecutor with a reputation for moral rectitude and an exacting management style, opening a wide-ranging investigation further rattled a demoralized White House staff, only a day before Mr. Trump was scheduled to depart on a grueling nine-day trip to the Middle East and Europe. Several of Mr. Trump’s advisers and associates have urged him to hire an experienced outside lawyer to help him deal with the surging controversy over whether his campaign had ties to Russia, according to several people briefed on the conversations.
Mr. Trump began the day in a defiant mood, abandoning the conciliatory tone the White House had shown in a statement Wednesday evening. In an early-morning Twitter post, he cited, without evidence, “illegal acts” committed by the administration of his predecessor, President Barack Obama, and the campaign of his former opponent, Hillary Clinton — and said they had never led to a special counsel.
“With all of the illegal acts that took place in the Clinton campaign & Obama Administration, there was never a special councel appointed!” Mr. Trump wrote on Twitter, initially misspelling counsel.
Moments later, he added, “This is the single greatest witch hunt of a politician in American history!”
The president was correct in his observation about the rarity of a special counsel, though his references to the Clinton campaign and the Obama administration did little to bolster his case. There were multiple congressional investigations into the attacks in Benghazi, Libya, and the role played by Mrs. Clinton, then the secretary of state, and Mr. Obama.
It was not the first time Mr. Trump likened the questions about his campaign and Russia to a witch hunt. In January, while president-elect, he said in an interview with The New York Times that the persistent focus on Russia’s hacking of the American presidential campaign was a witch hunt carried out by people bitter at his victory.
The president elaborated on that theme in the news conference, casting the investigation as a needless distraction from the achievements of his administration, which he enthusiastically enumerated.
“We’ve had tremendous success,” he said. “You look at our job numbers. You look at what’s going on at the border.”
Some of Mr. Trump’s claims raised more questions than answers. “You’re going to see some incredible numbers with respect to the success of General Mattis and others with the ISIS situation,” he said, referring to the defense secretary, Jim Mattis. “The numbers are staggering, how successful they’ve been.”
He promised to name a new F.B.I. director soon, having acknowledged to reporters earlier in the day that former Senator Joseph I. Lieberman of Connecticut was a top contender.
Mr. Trump’s sense of grievance over the Russia investigations had been deepening even before the naming of a special counsel. On Thursday, he arrived in the East Room primed for confrontation.
Rather than call on a reporter from a conservative-leaning news organization, as he has in the past, Mr. Trump pointed to Jonathan Karl, an ABC News correspondent known for his close questioning during White House briefings.
When a second reporter, Scott Thuman of the broadcaster Sinclair, asked Mr. Trump whether he had urged Mr. Comey to drop the Russia investigation, Mr. Thuman could not finish the question before the president interrupted. “No. No,” Mr. Trump snapped. “Next question.”
Mr. Santos, a Harvard-trained economist who won the Nobel Peace Prize last year for negotiating a peace treaty with the FARC guerrillas, watched the spectacle with an inscrutable expression. After he sidestepped a question about whether he agreed with the White House plan to build a wall on the border with Mexico to halt the flow of drugs into the United States, Mr. Trump jumped in.
“That was a very long and very diplomatic answer,” Mr. Trump said. “I will say it a bit shorter: Walls work. Just ask Israel.”
Earlier, Mr. Trump said that coca cultivation and cocaine production had risen to record levels in Colombia, and challenged Mr. Santos to remedy the problem.
Mr. Santos returned the favor minutes later when asked whether he had advice for Mr. Trump.
“I don’t think I’m in a position to give any advice to President Trump,” Mr. Santos said with a smile. “He can take care of himself.”