The new U.S. plan represents a remarkable shift for Obama, whose administration trumpeted the 2011 withdrawal of the last U.S. troops from Iraq as a major achievement and has since shifted its attention to other regional challenges, such as Syria, Egypt and the Israeli-Palestinian conflict.
Following a White House meeting with Iraqi Prime Minister Nouri Maliki, Obama said he shared Maliki's fears about militants' growing foothold in Iraq's western region and would join the Iraqi leader's effort to crack down. Administration officials said this would include growing intelligence support and new weaponry.
"We had a lot of discussion about how we can work together to push back against that terrorist organization that operates not only in Iraq, but also poses a threat to the region and to the United States," Obama said.
Closer cooperation also marks an abrupt turnaround for Maliki, who openly opposed keeping even a limited number of U.S. soldiers in Iraq after 2011, insisting the country could take care of itself.
After nearly nine years of U.S. occupation, the prospect of closer U.S. military ties remains deeply unpopular with the Iraqi public. But violence in Iraq last month surged to the highest level since 2008, with 964 Iraqis killed, and some fear the country is slipping back into civil war.
Maliki badly needs the kind of help his country received from Washington from 2006 to 2009 in battling Sunni Muslim extremists.
And the Obama administration, despite a deep reluctance to become more entangled in the Middle East, believes it cannot afford a further strengthening of the Al Qaeda affiliate, which is also called the Islamic State of Iraq in the Levant.
Officials believe the group is responsible for the deaths of 7,000 Iraqis this year.
Administration officials say that although they are not ready to send soldiers to Iraq, they will push for Congress to give Iraq the Apache helicopters, missiles and other equipment it seeks and will step up intelligence support to help Baghdad find and destroy Al Qaeda bases.
The militant group "has a presence in terms of camps and training facilities and staging areas that the Iraqi forces are unable to target effectively," said a senior administration official who declined to be named because of the sensitivity of the issue. Officials said they believed that Al Qaeda, once strongly established in the region, could seek to strike not only in Iraq, but far from its regional base.
The turmoil in Syria has added to the instability, with fighters and weaponry crossing over the border into Iraq.
The plans for Iraq illustrate the challenges the White House faces in its efforts to limit its Middle East involvement. The Obama administration has declared it will not allow Middle East problems to consume the president's remaining three years in office, but events in the region continue to draw attention.
Maliki, who had not visited the White House for two years, spent the week in Washington lobbying administration and congressional officials for more arms, intelligence help and training.
Iraqi officials said they did not ask for special forces or CIA advisors, but were not ruling out such things.
American drone strikes, carried out with the support of Maliki's government, are another option.
Maliki's critics, who see the Shiite Muslim leader as increasingly autocratic and unwilling to share power with Iraq's Sunni Arab and Kurdish minorities, oppose increased U.S. security support, fearing he might use American weapons to attack his domestic political rivals. But Maliki's aides said Iraq could turn to other world powers if the United States turned down its request.
In his appearance with Obama, Maliki said: "We have a friendship agreement, and we have a Strategic Framework Agreement, and we need to activate them."
Many members of Congress left meetings with Maliki this week angry and frustrated that the Iraqi leader had not done more to foster an inclusive government with his rivals, and they complained that Iraq continues to allow Iran to fly arms over its airspace to help the Syrian government against rebels there.
Senior U.S. officials say that Iraq has been reducing the number of Iranian overflights and that they will press Maliki to curtail them further as part of the increased coordination.
This week, the heads of the Senate armed services and foreign relations committees wrote a letter to Obama pressing him to demand more concessions from Maliki. Yet they urged further U.S. counter-terrorism assistance.
The new militant threat is highly sectarian, killing Shiite civilians even in playgrounds and at weddings and funerals. There were 38 suicide attacks in October alone, officials say.
U.S. officials are telling Iraq that it cannot relieve the threat by military attacks alone, and that it needs to work with Sunni leaders and give them more power, as it did during the height of the carnage in 2006-08.
Iraqi officials told their U.S. counterparts that they were willing to try this approach.
Obama gently pressed for more inclusivity from Maliki, whose government fears a return to power of the Sunni leaders who dominated the Shiite majority during the rule of Saddam Hussein.
"We are deeply committed to seeing an Iraq that is inclusive, is democratic, and is prosperous," Obama said.
Maliki closed his comments by saying, for the first time in English, "So I might see you in Iraq?"
"Maybe sometime soon," Obama replied quietly, according to a transcript.