By Jonathan Beale
BBC News, Washington
The US has been measured in its criticism of President Musharraf
This is a dilemma that US President George W Bush would rather have avoided.
But events in Pakistan have forced the president to weigh up his two key foreign policy commitments: fighting the "global war on terror" and his promise to spread democracy and freedom.
As far as Pakistani leader Gen Pervez Musharraf is concerned, the US cannot have both - at least not yet.
Gen Musharraf's declaration of a state of emergency is a key test of US priorities.
And at the moment it appears that stability and having an ally in the fight against extremism are just as important as pressing ahead with elections.
So the criticisms of Pakistan's leader from the White House have been measured and careful.
Initially, President George W Bush got Condoleezza Rice to call Gen Musharraf to express his "deep disappointment".
Mr Bush then escalated his response, calling Gen Musharraf himself for a "frank" conversation in which he urged him to call off the state of emergency and stand down as head of the army.
Within hours, Gen Musharraf announced that Pakistan would hold parliamentary elections before 15 February.
He also renewed his promise to give up his military uniform, if and when the Supreme Court validated his recent election as president for another term.
Even while putting pressure on Gen Musharraf to act, Mr Bush was careful to note that he had been an "indispensable ally".
There was no warning from Mr Bush that America might pull the plug on the $1bn (£0.5bn) that it gives to Pakistan each year in mostly military assistance (the figure is probably much higher - but Washington does not talk about covert assistance).
Lawyers have been protesting against President Musharraf
Ms Rice has said that aid is now being reviewed - but at the moment it sounds more like an empty threat.
Mr Bush emphasised that he would continue to work with Gen Musharraf in the fight against Islamic extremism.
Indeed, the deputy secretary of state, John Negroponte, was sent to tell Congress that continued engagement with Pakistan was the only option, despite the deep disappointment over Gen Musharraf's actions.
But many in Washington will hope that events in Pakistan will now force a reassessment on US policy towards Pakistan.
There are plenty who doubt not just President Musharraf's commitment to democracy - but also his efforts to tackle extremism.
Al-Qaeda's leaders have found a hideout in Pakistan, the Taleban are still entrenched in the north-west of the country.
On democracy Gen Musharraf appears to have confirmed the critics' worst fears.
Despite his countless promises of moving towards democracy he has so far kept his uniform and made life as difficult as possible for his political opponents.
What is more, he snubbed the Bush administration's direct pleas not to declare a state of emergency.
Surely this is a man who cannot be trusted, critics would say.
But for the Bush administration there appear to be few alternatives.
Yes, they have encouraged Gen Musharraf to enter a political pact with Benazir Bhutto.
But there is no sense in the state department or the White House that they have backed the wrong horse.
Few could predict what would happen if Gen Musharraf were ousted from power.
The Bush administration has been far more cautious in lecturing allies about democracy after the Palestinian elections that brought Hamas to power.
Daniel Markey, who until recently served on the state department's policy planning staff, says that delaying democracy weakens the Pakistani government's capacity to fight extremism in the short term - and sows the seeds of more extremism in the long run.
In an article for the journal Foreign Affairs Mr Markey argues that the choice between supporting Pakistan's army and promoting democracy is false.
He says the US will only succeed in prosecuting the long war against extremism both by empowering Pakistan's civilians and by earning the trust of the army.
President Bush still needs both.