Mr Obama said the US was prepared for "targeted and precise military action, if and when... the situation on the ground requires it", but added that US troops would not fight in Iraq.
He went on to insist there was "no military solution" and urged the Shia-led Iraqi government to be "inclusive".
Iraq has asked the US for air strikes against the Sunni militants.
The gunmen - spearheaded by the jihadist Islamic State of Iraq and the Levant (ISIS) - have made major territorial gains in the past 10 days.
Mr Obama said it was not the US's place to choose Iraq's leaders.
