President Trump feels wronged.

Standing at center stage in a hockey arena here, delivering a rollicking speech that harked back to the glory days of his 2016 campaign, Trump was simmering with frustration.

Trump said he felt wronged that he was not given more credit for his historic meeting last week in Singapore with North Korean leader Kim Jong Un.

Wronged that his administration’s move to separate migrant children from their parents at the border garnered round-the-clock news coverage.

Wronged that the media is not instead focused on this week’s congressional hearings over a Department of Justice inspector general report, and wronged that the report backed up the FBI’s decision not to charge Hillary Clinton with crimes.

Wronged that he has to share some of the credit for the good economy with his predecessor, President Barack Obama.

Wronged that the media does not focus enough attention on the size of his crowds.

Wronged that a handful of protesters interrupted his rally speech.

And wronged that, after defying the predictions of political experts to become elected president as a populist hero, he still is not considered part of the nation’s elite.

“You ever notice they always call the other side ‘the elite’?” Trump asked. “The elite! Why are they elite? I have a much better apartment than they do. I’m smarter than they are. I’m richer than they are. I became president and they didn’t.”

Trump’s electric connection with his supporters is powered in part by his propensity to speak his mind, and he did not disappoint on Wednesday night. The president veered from his prepared script repeatedly to air his grievances before a capacity crowd of 9,000.

Many of Trump’s frustrations were about the way he is covered by the media — “those very dishonest people,” as he put it, gesturing toward the press riser and eliciting loud boos and chants of “CNN sucks!” from the crowd.

“I just got back, as you know, from Singapore, where I met Kim Jong Un, and we had a great meeting, great chemistry. We got along very well,” Trump said. “At first, everybody was amazed — amazed! — that we had the meeting. They couldn’t believe it.”

Then, as Trump told it, the ­media turned on him. “They said, ‘The president gave away so much!’ ”

“I got along with Kim Jong Un — and that’s a good thing, not a bad thing,” Trump said. “The fact that we do get along means we’re safe. I’m not saying things can’t happen. Things go wrong. Mistakes are made. Relationships get broken. But right now, you are so safe, and such a great event took place.”

Trump accused the media of focusing on family separations and the detention of children at the border to distract the public from congressional inquiries into a Justice Department watchdog report. The report backed up the FBI’s decision not to bring charges against Clinton after its investigation of her use of private emails as secretary of state.

“Have you been seeing this whole scam?” Trump asked. “No matter how many crimes she committed, which were numerous, they wanted her to be innocent.”

“How guilty is she?” Trump asked.

The crowd replied with chants of “Lock her up!”

For those who have closely followed Trump for years, the night was filled with many moments of deja vu, when it felt as though it suddenly was 2016 all over again.

He lashed out at the media several times, prompting his fans to boo the reporters in their midst, and demanded to know why television news networks don’t pan his crowd, showing its mass and might. He mocked the protesters who dared to interrupt him.

When one young man was escorted out by authorities, Trump yelled, “Going home to his mom.” A few minutes later, when another man with long, straggly hair was led out of the arena, the president asked, gleefully, “Is that a man or a woman? I couldn’t tell. Needs a haircut.”

There were chants of the president’s name, along with “Build that wall!” and “Lock her up!” and “USA! USA! USA!” and “Drain the swamp!” When the president vaguely alluded to the Senate’s unexpected vote against repealing and replacing Obamacare, a man in the stands bellowed, “John McCain!” and a woman shouted, “Coward!” One of the president’s loudest applause lines came after he mentioned reforms at the Department of Veterans Affairs and bragged that federal officials can now tell underperforming medical center employees: “You’re fired!”

And at one point, the president asked — as he often used to — if there is “anything more fun than a Trump rally.”

The crowd signaled there was not. Some people pumped their fists into the air, while others whistled, whooped and screamed out: “Thank you!” and “We love you, Trump!”

But there were some new additions to the old lineup, reminders that the year is 2018, not 2016.

The stage was decorated with signs proclaiming, “Promises made. Promises kept.” Before the rally, the crowd was entertained by newscast-style video clips featuring the president’s daughter-in-law, Lara Trump, who interviewed the manufacturer of the campaign’s signature hats and small-business owners that have benefited from the Republican-pushed tax cuts.

Early on, Trump invited congressional leaders onto the stage and gave the microphone to Pete Stauber, a GOP candidate in Minnesota’s 8th Congressional District, which is held by a Democrat and is a top target for Republicans hoping to gain seats in the House.

Trump ticked through his accomplishments in office, including job growth and steel tariffs, which could be a boost in Duluth, which is home to the state’s Iron Range and has been buffeted by global economic trends in the steel and other manufacturing industries.

He also talked about his plans for the future. When the president mentioned new investments in NASA, which he had announced Monday at the White House, the crowd chanted, “Space Force!”

“We had the Army, the Navy, the Air Force, the Marines, the Coast Guard,” Trump said. “Now we’re going to have the Space Force. We need it!”

Josh Dawsey in Washington contributed to this report.