WASHINGTON (CNN) -- Sen. Barack Obama, in an op-ed piece in Monday's New York Times, embraced Iraqi Prime Minister Nuri al-Maliki's recent call for a timetable for American troops to leave Iraq as "an enormous opportunity."
The presumptive Democratic presidential nominee's column, titled "My Plan for Iraq," repeated his pledge that "on my first day in office, I would give the military a new mission: ending this war."
Obama wrote that U.S. troops would be redeployed from Iraq to "focus on the broader security challenges that we face" and that "unlike Senator McCain, I would make it absolutely clear that we seek no presence in Iraq similar to our permanent bases in South Korea."
Ending the Iraq war is necessary so that the United States can focus on Afghanistan and Pakistan, "where the Taliban is resurgent and Al Qaeda has a safe haven," he wrote.
"Iraq is not the central front in the war on terrorism, and it never has been," he wrote.
"As Adm. Mike Mullen, the chairman of the Joint Chiefs of Staff, recently pointed out, we won't have sufficient resources to finish the job in Afghanistan until we reduce our commitment to Iraq," Obama wrote.
Al-Maliki, in a speech a week ago, said there should be a timetable to withdraw U.S. troops from Iraq in any agreement on future ties between Iraq and the United States.
Obama wrote that al-Maliki's call "for a timetable for the removal of American troops from Iraq presents an enormous opportunity."
"We should seize this moment to begin the phased redeployment of combat troops that I have long advocated, and that is needed for long-term success in Iraq and the security interests of the United States," Obama wrote.
Republican presidential candidate John McCain, who has been pilloried by Democrats for suggesting U.S. troops could be based in Iraq for up to 100 years, said last week that the Iraqis have made clear that any withdrawal would be "based on conditions on the ground."
Maliki is "a politician," McCain told MSNBC. "He is a leader of a country that's finally coming together. The fact is that we and the Iraqis will deal in what is in the national security interests of both countries."
Obama wrote that his plan "would inevitably need to make tactical adjustments," with military commanders and Iraqi officials consulted "to ensure that our troops were redeployed safely."
"As I've said many times, we must be as careful getting out of Iraq as we were careless getting in," he wrote. "We can safely redeploy our combat brigades at a pace that would remove them in 16 months. That would be the summer of 2010 - two years from now, and more than seven years after the war began."
A "residual force" would remain in Iraq to "perform limited missions: going after any remnants of Al Qaeda in Mesopotamia, protecting American service members and, so long as the Iraqis make political progress, training Iraqi security forces," Obama wrote.
"That would not be a precipitous withdrawal," he wrote.
Obama's column also pledged to raise $2 billion through "a diplomatic offensive with every nation in the region" for "a new international effort to support Iraq's refugees."
Obama acknowledged that since the troop surge -- which he opposed -- began "our troops have performed heroically in bringing down the level of violence."
"But the same factors that led me to oppose the surge still hold true," he wrote. "The strain on our military has grown, the situation in Afghanistan has deteriorated and we've spent nearly $200 billion more in Iraq than we had budgeted."
Obama wrote that he would send at least two more combat brigades to Afghanistan.
"We need more troops, more helicopters, better intelligence-gathering and more nonmilitary assistance to accomplish the mission there," he wrote. "I would not hold our military, our resources and our foreign policy hostage to a misguided desire to maintain permanent bases in Iraq."
McCain and the Bush administration have refused to "embrace this transition -- despite their previous commitments to respect the will of Iraq's sovereign government," he wrote.
"They call any timetable for the removal of American troops 'surrender,' even though we would be turning Iraq over to a sovereign Iraqi government," he wrote.
"Those responsible for the greatest strategic blunder in the recent history of American foreign policy have ignored useful debate in favor of making false charges about flip-flops and surrender," he wrote.
"It's not going to work this time. It's time to end this war."