US President Barack Obama said on Thursday that he was sending up to 300 military advisers to Iraq but stressed the need for a political solution to the crisis, as government forces continued to battle Sunni rebels.

Speaking after a meeting with his national security team, Obama said he was prepared to take "targeted" military action later if deemed necessary, thus delaying but still keeping open the prospect of airstrikes to fend off an insurgency.

But he insisted that US troops would not return to combat in Iraq.

Obama said that another ground war would not solve Iraq's problems. The country's Shia-led government is facing a rebellion by Sunni fighters and members of the Islamic State in Iraq and the Levant (ISIL) armed group.

"We do not have the ability to simply solve this problem by sending in tens of thousands of troops and committing the kinds of blood and treasure that has already been expended in Iraq," Obama said.

"Ultimately, this is something that is going to have to be solved by the Iraqis."

Obama said the advisers would "assess how we can best train and advise and support Iraqi security forces."

He added that the US was ready "to create joint operation centres in Baghdad and northern Iraq to share intelligence and coordinate planning to confront the terrorist threat of ISIL."

"We will help Iraqis as they take to fight terrorists who threaten the Iraqi people, the region and American interests as well," he said.

"We will be prepared to take targeted and precise military action if and when we determine that the situation on the ground requires it."

Call for unity

The US president said Iraqi leaders should rise above their differences and find a political solution to the crisis.

Obama, however, stopped short of calling for Nouri al-Maliki to resign as Iraqi prime minister, saying it was not up to the US to choose Iraq's leaders.

"There is deep division between Sunni, Shia and Kurdish leaders and as long as those deep divisions continue or worsen, it's going to be very hard for an Iraqi central government to direct an Iraqi military to deal with these threats."

Obama also said that Shia-led Iran could play a constructive role in Iraq if it sent a message to Baghdad to be inclusive and respectful of the interests of Sunni Muslims and Kurds.

He said the situation could worsen if Iran entered the conflict solely on the side of the Shia government, adding that Iran could find itself fighting on several fronts across the region.