By Paul Reynolds
World affairs correspondent, BBC News website
President-elect Barack Obama, who takes office on 20 January 2009, will face a number of key foreign policy problems. Here are 10 current challenges - and how he might tackle them.
US ROLE IN THE WORLD
One conclusion from the US vote must be that the American electorate wants a significant change in foreign policy
from that of George W Bush.
Iraq: Obama wants most US troops out by mid-2010
The change might be characterised as a move from unilateralism to multilateralism - and less talk about the United States as the "world's only superpower".
Confrontation might give way to greater diplomacy.
However, US presidents, whatever the expectations, often enter or get drawn into conflicts, so nobody should expect a conflict-free presidency. President-elect Obama will enter office fighting two existing wars. How he handles them will help define his era.
Barack Obama says he will tell his commanders to redefine their mission as one of "successfully ending the war." But that has to be done, he says, "responsibly".
He has defined this as giving time for the Iraqi government to strengthen its own armed forces and he wants a phased withdrawal of most US troops "within 16 months" of his inauguration, which means the end of May 2010.
Potentially, this could be huge policy success for him. However, a "residual" force would remain to conduct operations against al-Qaeda in Iraq, so no complete withdrawal is envisaged.
Perhaps the biggest challenge on his agenda. If in Iraq the war is winding down, in Afghanistan it is winding up.
President-elect Obama is promising to "focus on Afghanistan".
He has said he will send two more combat brigades. He has also promised to attack al-Qaeda figures, especially Osama Bin Laden, wherever they might be and, it seems, whether or not Pakistan agrees.
Improving the situation in Afghanistan may be the toughest challenge
Improving the situation in Afghanistan will mean improving the performance of the Afghan government and trying to evolve a more effective policy with Pakistan (whose stability is in itself a major problem) to undermine the Taleban and al-Qaeda forces entrenched in the Pakistan border regions.
'WAR ON TERROR'
President Bush's famous phrase might be given less prominence in an Obama administration. He wants to concentrate on winning what the 9/11 Commission called "the battle of ideas" by "returning to an American foreign policy consistent with America's traditional values and by partnering with moderates within the Islamic world to counter al-Qaeda propaganda".
However, there will still be a hard edge to his policy. He has said he "will not hesitate to use military force to take out terrorists who pose a direct threat to America."
Look for two key indicators - the closure of Guantanamo Bay and the extension of the ban on torture to the CIA, which means the end of waterboarding.
If, or rather when, Guantanamo Bay is closed, he will have to decide what to do with the hard core that the US authorities claim remains among the 255 or so prisoners still there.
President-elect Obama has suggested using the normal US legal system to try them, but some of the evidence available under the military commissions (evidence obtained by coercion or worse) would be banned from US courts. What then?
Update 11 November: The President-elect's legal team is floating the idea of a hybrid system under which prisoners could be tried in the US by a mixture of civilian courts and courts martial. No decisions have been taken yet, though.
Look also for problems in new areas of al-Qaeda activity, especially Algeria and Somalia.
Potentially a huge crisis. Much depends on what Iran does.
If it continues with its low-grade enrichment of uranium, it could be that a new administration will simply carry on with sanctions, even trying to widen and deepen them.
An Iranian move to enrich to weapons-grade uranium would signal a step increase, in which case Israel would be urging military strikes against Iran's nuclear facilities.
The consequences of such a strike would be severe.
Barack Obama has said he will talk to Iran "without conditions", though not necessarily at presidential level in the first instance. The current Iranian leadership is unlikely to give up enrichment, so any agreement might have to include an Iranian right to some enrichment, but under strict controls.
MIDDLE EAST PEACE PROCESS
President Bush had hoped to have an agreement between the Israelis and the Palestinians by the end of this year but that looks impossible.
So Barack Obama will probably be faced with the perennial issue of how far to intervene in the peace process, such as it is, with the weight of the United States.
The first stage is the Israeli election set for 10 February, which should indicate whether there will be an Israeli government ready to make compromises.
Beyond Israel/Palestine, there is what Richard Holbrooke, a possible Secretary of State, has called an "arc of crisis" to be dealt with from Turkey to Pakistan. These days that includes Syria, whose help will be needed for the stabilisation of Iraq next door.
Recent events in Georgia precipitated a crisis in relations between Russia and the West not seen since the end of the Cold War.
This encapsulated all the frustrations that have built up on both sides and raised the question of how the new administration will frame its policy towards Russia. It needs Russian help in dealing with other problems such as Iran and Darfur, where the Security Council is driving policy.
Russia's military intervention in Georgia raised the diplomatic stakes
The immediate issue is how fast to allow Georgia (and Ukraine) to advance towards the Nato membership they have been promised in principle.
Nato foreign ministers discuss this in December, and behind the scenes the Obama team will have its say. But even the Bush administration is now saying that Georgian membership is "years away", so there are opportunities here for progress with Russia.
The US anti-missile system to be installed in Poland and the Czech Republic remains a problem for Russia. Will that be slowed down?
Clues for how President-elect Obama will deal with Russia will also be seen in how he handles nuclear issues. A key one is whether the US and Russia will negotiate further reductions in nuclear weapons.
On the wider front, Barack Obama endorsed the call last year by four senior former US diplomats (including Henry Kissinger) for the US to aim for a nuclear weapons-free world, as it is supposed to be under the Nuclear Non-Proliferation Treaty. How far will this be taken?
The latest North Korean moves have been positive. The country has agreed on procedures to verify the halt in its nuclear programme in exchange for being removed from the American list of terrorist-supporting states.
But the North is likely to retain the nuclear weapons it says it has, so the issue for the next president is whether he can get North Korea to give up its weapons altogether. And who will the president be dealing with - is Kim Jong-il a well man?
US relations with China are important across the board, since China is a permanent member of the Security Council and wields immense economic influence in the world.
China itself is not currently a problem for the US, though the future of Taiwan always has the potential to divide them and Tibet continues to be an irritant.
Over recent years, China has chosen to concentrate on domestic economic development and as long as that continues to be its priority, its relations with the US are likely to remain stable. There is no indication that Barack Obama wants anything else.
'NEW DIPLOMACY': FINANCE, CLIMATE CHANGE, ENERGY
Under this heading come the major issues that are part of what is sometimes called the new diplomacy.
The current financial crisis, in which US government money has been used to shore up the banks, will force the next president to take a more hands-on approach than presidents usually like to. And he will ask himself how to counter the diminished standing that the US, through the failure of its financial organisations, now has in the world.
Barack Obama has committed himself to doing more on global warming and wants greenhouse gases reduced by 80% by 2050. This will be one of the most important issues of his presidency, as the Kyoto Protocol expires in 2012 and negotiations about a follow-up have stalled.
Energy, especially the supply of oil, will be another challenge. The president-elect has pledged to eliminate US reliance on Middle East and Venezuelan oil within 10 years.
However, practically every president, going back to Jimmy Carter in 1979, says that America must use less oil and finds it hard to take action.
President-elect Obama's handling of these new agenda problems will help determine the answer to the first of these top 10 problems - how the US will forge a new role for itself in the world under his administration.