The two leaders said they shared similar hopes for improvements in Iraq
The leaders of the US and Iraq have vowed that co-operation between the two nations can help bring peace to Iraq, during talks at the White House.
US President Barack Obama pledged to keep to a commitment to withdraw all US troops from Iraq by the end of 2011.
Prime Minister Nouri al-Maliki said Iraq's armed forces were now "highly capable" and were already successfully policing towns and cities.
His visit comes three weeks after US troops withdrew built-up areas.
Iraqi troops now take the lead security role in Iraq's urban areas, and analysts say the latest attacks are a sign that insurgents remain intent on destabilising the country.
There has been a marked drop in violence in Iraq in recent months, though attacks increased in June in the run-up to the American pull-back.
The White House talks come at the beginning of a four-day visit to the US.
Speaking after private talks, Mr Obama said the US was pleased with the progress being made in Iraq, but warned that violence would continue and the country would see more death and destruction in the years to come.
"There will be attacks on Iraqi security forces and the American troops supporting them. There are still those in Iraq who would murder innocent men, women and children. There are still those who want to foment sectarian conflict.
"But make no mistake, those efforts will fail," Mr Obama said.
Mr Maliki said Iraq was working towards a future free of the sectarian bitterness that has lain at the heart of much of the violence within the country since the toppling of Saddam Hussein in 2003.
"The sons of Iraq and the daughters of Iraq will be equal," Mr Maliki said, vowing that the country's national unity government would work to end often bitter divisions between Iraq's Shias, Sunnis and Kurds.
"Iraq has suffered a great deal from being marginalised by the policies of sectarianism and of war. We will work very hard in order not to allow any sectarian behaviour to happen," he said, saying a new strategic relationship with the US would help achieve this goal.
Mr Obama also lent his support to Iraqi efforts to see sanctions, in place since the Gulf war of 1991, lifted by the UN.
He said the US would work "diligently" on the issue, adding that Iraq "should not suffer for the sins of a deposed dictator".
The quest to lift stringent sanctions is a key issue for Mr Maliki on his US trip, says the BBC's Jon Donnison, in Washington, adding that the Iraqi prime minister visited the US on Wednesday morning to press his case.
Mr Obama promised a withdrawal during his election campaign last year, and Mr Maliki faces a general election in Iraq in January in which he is staking his reputation on being the man who oversaw the transfer of military control from US to Iraqi hands.
There are still regular bombings and attacks inside Iraq
But the BBC's Gabriel Gatehouse, in Baghdad, says that, behind the optimistic talk about withdrawal, reduced violence and the increased capabilities of Iraqi security forces, lie two facts - there are still around 130,000 American troops inside Iraq, and fatal attacks remain an everyday occurrence.
The question remains how to extract American forces from Iraq by the end of 2011 without the security situation getting any worse, our correspondent says, adding that Iraqi reconciliation is key - as Mr Maliki stressed in Washington.
Iraq's Shia, Sunni and Kurdish groups are divided on a number of issues, including how to share Iraq's oil wealth, the authority of the central government, and political power-sharing.
None of this will be easy to resolve, our correspondent says, with the various parties jostling for position ahead of elections in January.
What are your expectations for Prime Minister al-Maliki's visit to the United States? Send us your comments using the form below.
The BBC may edit your comments and not all emails will be published. Your comments may be published on any BBC media worldwide.