He must help weak elected leaders amid conflict in all three Islamic nations.
In all three, however, Mr. Obama's most trying task isn't so much on the military side. It is helping those countries – beset with tribal, ethnic, and religious divisions – to fill a democratic vacuum in each one's elected civilian leadership.
Last week, the Pakistani military launched a major offensive against the Taliban in South Waziristan, with backup by US intelligence. This may be the largest military push ever by an Islamic nation against religious fundamentalists, a result of Pakistan's recent awakening to the Taliban's rising threat.
But a weak civilian government, led by President Asif Ali Zardari of the ruling Pakistan People's Party, is ill-equipped to follow up in areas cleared by the military. Without strong governance and better economic opportunities in these tribal areas, the Taliban and foreign jihadists could easily return.
In addition, the Pakistani Army and elected leaders are at odds over tough conditions imposed in a US aid package passed by Congress last week that provides Pakistan with $1.5 billion a year for the next five years. The Obama administration has had to intervene to lessen the tension, especially the Army's resentment over US insistence on civilian rule over the military.
Even if that tension is resolved, the success of US aid in helping bolster government rule in former Taliban-run areas depends on how much the White House keeps backing Mr. Zardari – although discreetly, to avoid making him appear an American puppet.