Trump clearly sees the shooting as playing right into his hands: Although Omar Mateen, the shooter in Orlando, was a native-born American citizen, his parents came to the United States from Afghanistan. He argued Tuesday that the government is not taking the threat from terror seriously enough, and he blasted Hillary Clinton’s call to allow 65,000 Syrian refugees into the country, which he pointed out would amount to a 550 percent increase over the current target of 10,000.

“How does this kind of immigration make our life better in this country? How does it do it?” he said. “We’ll fix it.”

In another peculiar moment in the speech, Trump read the full lyrics of Al Wilson’s classic “The Snake,” framing it as a parable about immigration in what has become an occasional set piece in his rallies. He also once again complained that American Muslims were failing to report terrorists in their midst. “People knew that bad thing were going to happen, and they didn’t report,” he said. “We have to have people report.”

While many Republican leaders distanced themselves from Trump’s views on Muslims, his comments have especially earned Obama’s ire. Trump, for his part, seemed to be delighted to have a chance to swing at the president. Of course, Trump went through the motions of attacking Hillary Clinton, repeatedly calling her “Crooked Hillary” and enlisting the senator from Vermont to his cause: “We have a woman, Hillary Clinton, she’s got had judgment. Bernie Sanders said she can’t be president because she’s got bad judgment.” He called on the Clinton Foundation to return $25 million from Saudi Arabia. He insisted she couldn’t be winning women, despite poll results that indicate it is so. (It was a rare instance of Trump ignoring polls. At another point in the evening, he bragged, “I think I've made polling a very important thing.”)

But it was attacking Obama that Trump really seemed to relish. “I watched Obama today, and he was more angry at me than he was a the shooter,” he smirked. Later, he added, “I would have been very happy had Obama been a great president. I’m a Republican, I’m a conservative, but had he been a great president I would have been happy, most of the people in this room would have been happy. But you know, he’s been one hell of a lousy president.”

Trump’s strange claim about soldiers stealing money came in the midst of a spiel on Iraq, in which he noted, correctly, that Hillary Clinton had backed the invasion and claimed, falsely, that he had opposed it from the start. His argument against foreign interventions (except to seize foreign oil, by what processes he has never quite explained) set up his biggest applause line of the night.

“We spent probably spent $4 trillion over the last 15 years in the Middle East. We build a school, it gets blown up. We build it again and again and again,” he said. “If we want to build a school in Greensboro, or a school in Brooklyn, in Los Angeles, we have no money. We’re flat broke!”