President Obama sent a clear message Thursday to the terrorists pillaging war-torn Iraq — there will be no return of US ground troops.

“American combat troops are not going to be fighting in Iraq again,” Obama announced in a tip of the hand that also revealed that he does plan to send in up to 300 military “advisers.”

The president also gave his strongest indication yet that US drone or airstrikes may be in the offing.

“Going forward, we will be prepared to take targeted and precise military action” informed by recent surveillance and reconnaissance efforts, the president said.

“I will consult with Congress and leaders in Iraq and in the region” before any strikes, he added.

The 300 military advisers would join up to 275 already being positioned in and around Iraq to protect the US Embassy in Baghdad and other American interests.

They’ll train Iraqi forces and gather intel on the militant group, the Islamic State in Iraq and Syria, or ISIS, which aims to create a terrorist safe haven spanning the two countries.

But Obama repeatedly emphasized that American soldiers will not step foot in Iraq, where ISIS has waged a bloody insurgency for weeks, capturing northern cities and this week seizing control of at least a portion of the country’s largest oil refinery, 150 miles north of Baghdad.

Earlier Thursday, US officials confirmed to The Wall Street Journal that the fanatical group has also taken control of Saddam Hussein’s former chemical-weapons production facility, just 45 miles northwest of the capital.

Some chemical munitions remain sealed in two bunkers there, but officials described them as dangerous only to anyone who tries to move or use them.

Obama also took a shot at Iraqi Prime Minister Nouri al-Maliki, scolding the embattled leader for helping fan the flames by shutting Sunnis and Kurds out of the majority-Shiite government.

“We’ve consulted with Mr. Maliki, and we’ve said to him privately — and we’ve said it to him publicly — that whether he is the prime minister or any other person who aspires to lead . . . there has to be an agenda where Shia, Sunni and Kurd feels a part of the political process.”

“Part of what our patriots fought for” during the Iraq war, “is the right for Iraqis to choose their own destiny and choose their own leaders,” he added.

The president further said he believed that neighboring Iran “can play a constructive role, if it is helping to send the same message to the Iraqi government that we’re sending, which is that Iraq will only hold together if it is inclusive.”