The generals tried hard to keep politics out of the Pentagon, but even they don’t have the firepower to stop Donald Trump.

The president went to the Pentagon on Thursday to deliver what was supposed to be a speech announcing the findings of the Defense Department’s missile defense review. Instead, the president used senior uniformed and civilian DOD leaders as a backdrop for a partisan political speech. This time, Trump bashed Democrats and previous unnamed presidents while proclaiming his own greatness on everything from missiles to the budget, the Iran deal, and the military’s overall strength.

It was unprecedented, even for a commander in chief who has used troops as backdrops since his 2016 campaign. Trump started his presidency by crossing unwritten lines — and perhaps Constitutional boundaries — by giving a politically charged speech inside CIA headquarters at Langley, Va. and, one month later, disparaging the American press before troops at the Tampa, Fla., headquarters of U.S. Central Command and U.S. Special Operations Command. Both drew sharp criticism, for politicizing America’s strictly apolitical intelligence professionals and troops who swear oaths to serve the Constitution and are expected to do their sometimes life-threatening jobs without regard to the party of the president.

More recently, when Trump visited troops in Iraq and in Germany, he was again criticized for the political nature of his rallies and message, especially after troops were permitted to bring red “Make America Great Again” hats for him to sign.

Paying the critics no mind, Trump made no attempt to keep his Thursday appearance politically neutral. When the president walked into the Pentagon auditorium to a standing ovation, he immediately took credit for the reception, saying it was because he had given them the biggest budget.

“Thank you, wow. That’s really nice, thank you. You’re only doing that because I gave you the greatest and biggest budget in our history,” he said, jokingly. “That’s the only reason you gave me such a nice welcome.”

U.S. service members are required to stand at attention when senior-ranking officers, including the commander in chief, enter the room. On Thursday, they laughed and applauded the line.

Trump led off his speech — ostensibly about missile defense — with a rant about border security, the wall, and the government shutdown, criticizing Democrats and House Speaker Nancy Pelosi, D-Calif.

“This should've been done many years ago. Should've been done really by other presidents and it wasn’t. Just like many of the other things we’re doing that could’ve been doing years ago. Whether it’s our negotiations with North Korea, moving the embassy to Jerusalem, so many things…”

“The federal government remains shut down because congressional Democrats refuse to approve border security,” Trump said. “While many Democrats in the House and Senate would like to make a deal, Speaker Pelosi will not let them negotiate. The party has been hijacked by the open borders fringe within the party — the radical left becoming the radical Democrats. Hopefully Democrat lawmakers will step forward to do what is right for our country.”

This kind of partisan attack is simply not done at the Pentagon. Former Defense Secretary Jim Mattis and Joint Chiefs Chairman Gen. Joseph Dunford, who was traveling overseas, have taken extraordinary steps to keep political discourse away from the military. In part, they did so by sharply reducing their press appearances, public engagements, and the number of reporters permitted to travel with them abroad. The select officers and civilians picked to hear this speech apparently got the message. The room did not applaud.

Still, the president continued to wade into politics by tweaking the noses of his predecessors and taking personal credit for new policies and arguably untrue advances in foreign relations.

“What we’ve done to Iran since I’ve become president is rather miraculous. I ended the horrible, weak Iran nuclear deal, and I will tell you Iran is a much different country today than it was two years ago. It’s not the same and it won’t be the same, and I do believe they want to talk,” Trump claimed, turning away from the teleprompters and appearing to go off his script.

Trump disparaged previous administrations as well, repeating his campaign trail-era characterization that the military was “depleted,” which long ago received a three Pinocchios rating from the Washington Post fact checkers. But facts never stopped Trump.

“When I took office, you know it better than anybody in the world, our military was very tired. It was very depleted. I won’t even tell you the things that some of our great generals were telling me. And now it’s being rebuilt at a rapid rate and very shortly will be more powerful than ever before,” Trump said.

Speech given. Claims made. Political opponents insulted. Troops in the picture. Mission accomplished.