Updated

The coalition forces in Afghanistan are going to wrap up their mission responsibly and leave Afghanistan in better, albeit not perfect, condition, President Obama and British Prime Minister David Cameron said Wednesday during remarks to reporters at the White House.

The president, who was hosting the British prime minister for an official visit focused heavily on joint foreign policy, said recent events in Afghanistan have marred efforts to put the war-worn country on an even keel but will not deter the objective of giving security responsibility to the Afghans and getting out by the end of 2014.

"That transition is already under way and about half of all Afghans currently live in areas where Afghan security forces are taking responsibility," Obama said, adding that the forces have already made "very real progress dismantling Al Qaeda and breaking the Taliban's momentum."

Obama said he anticipates no "sudden, immediate changes to the plan we already have," for bringing forces home.

Cameron said Britain, which has 9,500 soldiers stationed there and has lost more than 400 so far, will not give up on the mission "because Afghanistan must never again be a safe haven for Al Qaeda."

More On This...

    "We won't build a perfect Afghanistan," Cameron said, noting that progress has been made to open markets, increase health care access, send children to school and improve the basic standard of living and security. "But we can help ensure that Afghanistan is capable of delivering its own security without the need for large numbers of foreign troops."

    Obama said he will go into details of the transition during a May NATO conference in Chicago, but the objective is to move toward a support role for Afghan National Security Forces next year, before a complete pullout. NATO, however, will maintain an enduring commitment so that Afghanistan never again becomes a haven for Al Qaeda to attack our countries.

    On Iran, Obama insisted there is still "time and space" for a diplomatic solution, in lieu of a military strike to set back Iran's progress toward a possible bomb, but said "the window for diplomacy is shrinking."

    "We are determined to prevent Iran from acquiring a nuclear weapon," Obama said, adding that he had sent a message "personally" to the Iranian leadership that it should re-enter international arms talks in good faith.

    As for Syria, the president said international military intervention in Syria would be premature and could lead to a civil war, adding to the death toll, which the U.N. estimates is already at more than 7,500. On Wednesday, reports said Syrian dictator Bashar al-Assad had placed mines along the borders leading out of Syria to prevent anyone from seeking refuge in Turkey or Iraq.

    "Assad will leave power, it's not a question of if, but when," Obama said.

    Obama was hosting Cameron on Wednesday in a full day of official meetings followed by an official dinner. The two got the day started with an elaborate welcome ceremony at the White House and jokes about the nations' shared history.

    Cameron and his wife arrived at the executive mansion on a mild, sunny, spring-like morning in the U.S. capital. The prime minister was greeted with a 19-gun salute.

    Several hundred people, including schoolchildren waving U.S. and British flags, gathered for the arrival ceremony on the South Lawn.

    Obama welcomed the prime minister in a ceremony, joking that it's been 200 years since the British first visited the White House -- when they attacked during the war of 1812.

    "They made quite an impression," he said to laughter. "Really lit up the place."

    After the president's remarks, Cameron followed up by noting the military presence.

    "I am a little embarrassed to think that 200 years ago, my ancestors tried to burn this place," he said. "I see you've got this place a little better defended today."

    The two also joked about British and American idioms, with Cameron referencing "alley-oops" and "brackets" after a jaunt the night before to Dayton, Ohio, where they attended a first round game in the NCAA March Madness basketball tournament -- Mississippi Valley State vs. Western Kentucky. Western Kentucky won in a late turnaround.

    The arrival ceremony has all the trappings of a state visit, although it is not being called one, since the British monarch -- not the prime minister -- is considered the head of state.

    Afterward, the two exchanged gifts. The Obamas gave the Camerons a wood and charcoal burning Braten 1000 Series Grill to commemorate a May 2011 visit to England in which they grilled and served food to American and British Armed Service members. The Camerons also received two White House chef jackets with their names and American and British flags embroidered on them.

    In return, the Camerons gave the Obamas a ping-pong table.

    "We should practice this afternoon," Obama joked.

    During the dinner, the Camerons will hear Grammy-winner John Legend sing as well as Mumford & Sons, a British folk rock band. At the dinner will be "Homeland" actor Damian Lewis and his wife as well as golfer Rory McIlroy.

    The Associated Press contributed to this report.