Texas Gov. Rick Perry (R) warned Thursday that the unsecured southern U.S. border is creating a real risk that Islamic State agents could try to enter the U.S. and commit acts of terrorism.

In a speech at the Heritage Foundation that sounded very much like a warmup to a presidential run, Perry started by blasting President Barack Obama for failing to adequately enforce the border. That failure, Perry said, created the conditions that have prompted thousands of children and other illegal immigrants to try to cross into the United States.

Gov. Rick Perry warned Thursday that the weak southern border plus the growing threat from the Islamic State puts the U.S. at risk of a new terrorist attack. (AP Photo/Michael Thomas)

But far from being just a regional security issue, Perry said Obama’s international failure to rein in the Islamic State could make it worse. He said not only that it’s likely ISIS is thinking of exploiting the porous border, but that they may have already done so.

“I think there is a very real possibility that they may have already have used that,” Perry said.

“What rational observer doubts that such an attack is not part of their plan?” he asked. “And who thinks it’s a good idea to wait and give them more time instead of eliminating this menace this right now?”

Perry stressed that there’s no clear evidence that ISIS has infiltrated the United States through Mexico. “But your common sense tells you, when we’ve seen the number of criminal activities that have occurred… by individuals who have come into this country illegally over the last five years, the idea that they would not be looking at and managing any of those types of attacks from that region is not a good place to be,” he said.

Perry’s remarks hit Obama in two of his most vulnerable spots. The White House has been criticized for months for being unable to take steps to deal with the border crisis, and has been slowly and reluctantly pulled back into considering military plans in Iraq and Syria to deal with ISIS.

While Perry didn’t address his political future in 2016, he outlined several policy prescriptions for dealing with both crises, something other GOP candidates are likely to try as well.

For example, Perry said Obama has so far taken only half measures to deal with surging ISIS forces in both Iraq and Syria. He said ISIS has gotten “a taste” of U.S. power, but needs to see more.

“Nothing less than a sustained air campaign to degrade and destroy ISIS forces is required,” he said. “The Iraqi people are up against a terrorist blitzkrieg, and it went practically unhindered for many weeks.”

Perry also blamed Obama for releasing rhetorical points instead of engaging in Syria, a country that was home to a brutal civil war and is now seen as ISIS headquarters.

“We heard from the White House that [Syrian President Bashar] Assad must go,” Perry said. “That was an opinion, not a policy.”

Domestically, he said tougher border security is a necessary first step to help stop the flow of illegal immigrants, which is costing the U.S. hundreds of millions of dollars to process. He also said that without better enforcement, there can be no talk of immigration reform.

“Until the border is secure, there will be no conversation in this country about any immigration reform,” he said. “Americans do not trust Washington to deal with comprehensive immigration reform until that border is secure.”

Perry also took a swipe at Obama for promising the American people to bring the two parties together while he was running for office, and then acting in a highly partisan fashion as president.

“Twenty times, unanimously, the Supreme Court has had to set him straight on the limits of executive power,” he said. “And when an American president is constantly exceeding his lawful authority, it doesn’t exactly do much for bipartisan goodwill, either.”

Perry predicted that Republicans would win the Senate, which for the first time would give Obama a real taste of what it’s like to work and compromise with the GOP.

“He’s going to get a little taste of checks and balances,” he said. “He has an appointment, if you will, come January 3rd, with constitutional limits.”

Finally, Perry also addressed his indictment for threatening to veto the budget of a state agency, which even some Democrats have dismissed as a political attack that will quickly be dismissed. Perry said he was “very confident” he would prevail, and said he would fight the attack against his prerogatives as governor.

“I aim to defend our constitution and stand up for the rule of law in the state of Texas,” he said.