President Trump’s feud with the media turned into an all-out war Thursday afternoon.

His early presidency beset by damaging leaks and a burst of staff turmoil, Trump used a hastily called press conference to blast the media’s coverage of his administration in his strongest terms yet. He claimed the press is “out of control,” reports on his team’s ties to Russia are “fake,” and news outlets are attacking him because they oppose his agenda.

"The media’s trying to attack our administration because they know we are following through on the pledges that we made, and they’re not happy about it," Trump declared at the White House.

The president spoke and took questions for more than an hour and 15 minutes, even joking with some reporters toward the end and saying he was having fun. In a bid to preempt negative coverage of his remarks, Trump insisted he was not "ranting and raving." But he lamented that the "tone" of coverage of his administration is one of "such hatred."

"The public doesn't believe you people anymore," he said.

Trump, who is dealing with the roughest stretch of his nascent presidency so far, unleashed the battery of accusations after first announcing his newest pick for labor secretary. After his original nominee withdrew, Trump nominated law school dean and former federal prosecutor Alexander Acosta for the post Thursday.

"He has had a tremendous career," Trump said, noting he's been through Senate confirmation three times for past positions.

But Trump pivoted to tout his administration's record so far and to blast the media for allegedly underplaying progress made.

"The press honestly is out of control," Trump said, vowing to take his message "straight to the people."

Amid a court fight over his controversial immigration executive order, which he maintained is “lawful,” Trump said he would announce a "new and very comprehensive order to protect our people."

He also staunchly defended his administration’s work on everything from the economy to energy to security. "This administration is running like a fine-tuned machine,” he said.

The press conference was held days after Michael Flynn resigned as national security adviser over a controversy regarding his past contacts with Russia’s ambassador. Those contacts emerged in news reports. Fast food chain CEO Andrew Puzder also withdrew from consideration for labor secretary on Wednesday amid deepening scrutiny of his personal and professional past.

Trump on Thursday personally denied having any contact or connections with Russia, saying: "I have nothing to do with Russia. I have no deals there. I don't know anything."

While acknowledging he sought Flynn’s resignation, he also said Flynn was just doing his job by contacting Russia. He said Flynn was asked to resign because he was dishonest about the details of the call with Vice President Mike Pence.

And he dismissed recent reports that campaign aides had been in contact with Russian officials before his election. Trump called the reports a "ruse" and said he had "nothing to do with Russia." Trump added, "Russia is fake news. This is fake news put out by the media."

In a free-wheeling event that, before Trump, would have been unprecedented in a modern presidential news conference, the president by turns teased and lambasted members of the press corps.

Toward the end of the press conference, Trump summed up his complaints by suggesting he was being blamed for problems that have existed for years: “I didn’t come along and divide this country. This country was seriously divided before I got here.”

He also blasted Senate Democrats for holding up his Cabinet nominees.

His latest pick for Labor Department might have an easier time. If confirmed, Acosta would be Trump’s first Latino Cabinet member. According to top GOP sources, Republican Florida Sen. Marco Rubio and other Hispanic leaders are enthused about the pick.

Acosta currently is dean of Florida International University College of Law. He previously served as the first Hispanic assistant attorney general and as U.S. attorney for the Southern District of Florida, as well as on the National Labor Relations Board.

In the wake of the Flynn reports and other damaging stories, Trump also has vowed to root out those leaking sensitive information.

“We’re going to find the leakers. ... They’re going to pay a big price for leaking,” Trump said at a meeting ahead of the press conference.

Fox News' John Roberts and The Associated Press contributed to this report.