BAGHDAD  Senator Barack Obama arrived in Baghdad on Monday, meeting with Prime Minister Nuri Kamal al-Maliki and other senior Iraqi politicians, as an Iraqi spokesman said that the government was hopeful that foreign combat troops would withdraw in 2010.

Mr. Obama, on the latest leg of his first overseas tour as presumptive Democratic presidential nominee, arrived in the Iraqi capital in the early afternoon with an American delegation after first stopping in the southern Iraqi city of Basra.

Mr. Obama met with Mr. Maliki; the United States ambassador to Iraq, Ryan C. Crocker; the Iraqi national security adviser, Mowaffak al-Rubaie, and other Iraqi officials at the prime minister’s residence in the Green Zone.

Mr. Obama described his talk with Mr. Maliki as “a wonderful visit,” but news agencies reported that a government spokesman said that they did not discuss the timing of any troop withdrawal. However, the spokesman, Ali al-Dabbagh, addressed the issue. According to Reuters, he said, “We cannot give any timetables or dates but the Iraqi government believes the end of 2010 is the appropriate time for the withdrawal.” The Associated Press quoted Mr. Dabbagh as saying, “We are hoping that in 2010 that combat troops will withdraw from Iraq,” but noting that any plans would have to change should violence rise.