"Our strong presence in the Middle East endures," Obama said in a press conference following the meeting. "And the United States will never waiver in the defense of our allies, our partners and our interests."
The U.S. has warned Iraq's neighbors that even though American troops are leaving, the U.S. will maintain a significant presence there. About 16,000 people are working at the U.S. embassy in Baghdad, making it America's largest mission in the world.
Al-Maliki noted that Iraq will still need U.S. help on security issues, combating terrorism, and training and equipping the Iraqi military, as well as other areas including education and developing its wealth. He said there were "very high aspirations" for U.S. and Iraqi relations.
Solving troubles with Syria will also be significant to Iraq's future. The United Nations says 4,000 people have been killed in a government crackdown on protesters in the country. While Obama has called for Syrian President Bashar Assad to step down, al-Maliki fears a civil war could erupt if Assad falls and abstaining from Arab League votes suspending Syria's membership and imposing sanctions. Those positions align Iraq more closely with Iran, a key Syrian ally.
Obama said other nations must not interfere with Iraq's sovereignty. While he did not mention any countries specifically, U.S. officials are monitoring how neighboring Iran may seek to influence Baghdad after U.S. troops withdraw.
The White House said Obama and al-Maliki also discussed cooperation on energy, trade and education.
The U.S. withdrawal marks the end of a nearly nine-year war that has been deeply divisive in both the U.S. and Iraq.
As of late last week, the number of U.S. troops in Iraq had dwindled to about 6,000, down from 170,000 at the war's peak in 2007.
The Associated Press contributed to this report.