The re-elected president of Iran, Mahmoud Ahmadinejad, faces a very tough start to his second term. His two most urgent issues are Tehran's poor position in foreign affairs, thanks to his own unwillingness to allow international agencies to investigate the accusation that Iran has a nuclear weapons programme, and the disastrous economic situation - investment is very low and the oil price has fallen, so that he cannot buy his way out of trouble.

But to tackle these serious issues Ahmadinejad needs a strong political base from which to operate, and the confusion over the challenged election results have weakened him. The president can no longer claim the backing of the vast majority of the country, or even the entirety of the conservative establishment. How he responds to this political weakness remains to be seen: he may be forced to be more open to compromise; or he may become increasingly intransigent.

An important indication of how he will play his cards over the next year will be how he resolves his most immediate problem, which is the formation of his Cabinet. This will be quite a challenge thanks to the political turmoil in the country, and the rivalries engendered by the old Cabinet's infighting over Ahmadinejad's resistance to the Supreme Leader's order to sack his nominee for first vice-president, Esfandiar Rahim Mashaie. The three most important portfolios are defence, the interior (which also oversees elections) and foreign affairs.

He will have to submit his Cabinet to the hostile Majlis, Iran's parliament, whose speaker Ali Larijani lost to Ahmadinejad in the 2005 presidential elections. The timing is unfortunate: Larijani has just ordered a committee to look into accusations of prisoner abuse during the post-election crackdown, which means that the Majlis will be conducting an investigation of Ahmadinejad at the very same time that it is approving his Cabinet.