WASHINGTON (Reuters) -- U.S. Secretary of State Hillary Clinton told Pakistan's president and opposition leader over the weekend that U.S. aid could be at risk unless they defused a crisis over a top judge, U.S. officials said.

In a surprise move, Pakistan's government announced on March 16 it would reinstate Iftikhar Chaudhry as chief justice, aiming to defuse a crisis and end protests by lawyers and activists that threatened to turn violent.

The officials said Clinton on March 14 telephoned both President Asif Ali Zardari and his rival, former Prime Minister Nawaz Sharif, who had backed the antigovernment lawyers.

The officials said Clinton, who coordinated with British Foreign Secretary David Miliband, had exerted strong pressure for a deal.

Clinton told reporters the decision to reinstate Chaudhry was a first step for much-needed reconciliation and political compromise in Pakistan.

She avoided answering when asked if she had linked continued U.S. aid to a deal.

The stability of nuclear-armed Pakistan has emerged as a key worry in Washington, which also needs its help to combat a Taliban insurgency in neighboring Afghanistan

Asked if the political turmoil was distracting Islamabad from taking on the militants, Clinton replied: "They understand what is at stake." Congressional Doubts

U.S. officials said Clinton told both Zardari and Sharif congressional lawmakers might balk at sending Pakistan more aid while the crisis persisted.

"She warned them that congressional appropriations would be at risk," said one U.S. official, who asked not to be named.

A senior State Department official said "many" in Congress had expressed concern over what was happening in Pakistan.

"The secretary's friendly advice to the Pakistani leadership is that we have got to get this situation under control," the official said.

U.S. special representative to Afghanistan and Pakistan, Richard Holbrooke, also spoke several times over the weekend to Pakistani politicians.

"This was all done with great respect for Pakistan's sovereignty and sensibility but with great concern for the strategic and political implications of a protracted confrontation," a Holbrooke aide quoted him as saying.

The Obama administration is reviewing its strategy toward Pakistan and Afghanistan. Details, including possible future aid, are expected to emerge in the coming weeks.

In January, Zardari urged the United States to boost both military and nonmilitary aid.

The United States has spent billions of dollars in recent years helping Pakistan fight Al-Qaeda and the Taliban in remote tribal areas along the Pakistan-Afghanistan border.

Senator John Kerry, chairman of the Senate Foreign Relations Committee, released a report last month calling for $4 billion to $5 billion in immediate financial aid to help Pakistan avert financial meltdown.

Kerry welcomed the decision to reinstate the chief justice but said more must be done.

"Now, Pakistan's civilian leadership must avoid divisions and work together to further strengthen the nation's democratic institutions," the Massachusetts senator said in a statement.

State Department officials credited Pakistani leaders for their compromise and downplayed the effect of U.S. actions.

"These were decisions that had to be taken by the Pakistani leadership. And in the end, I believe they acted in the best interests of the Pakistani people, and that's what's important here," said State Department spokesman Robert Wood.