President Barack Obama signed a 7.5 billion dollar aid package for Pakistan into law on Thursday, as the key US anti-terror ally reeled from a new wave of militant attacks which killed 40 people.
Obama acted after the US Congress attempted to placate critics in Islamabad who warned the aid plan would violate Pakistani sovereignty, and after a last minute rescue mission to Washington by Pakistan's Foreign Minister.
"This law is the tangible manifestation of broad support for Pakistan in the US, as evidenced by its bipartisan, bicameral, unanimous passage in Congress," White House spokesman Robert Gibbs said in a statement.
The package is intended to bolster Pakistan's battle against extremism by tripling non-military US aid as Islamabad faces a bloody domestic insurgency and plays a central role in the US battle against Al-Qaeda.
The measure offers 1.5 billion dollars a year for five years to improve Pakistani schools, to fund groups that defend the rights of women and children, and to train and modernize the Pakistani police force.
It also provides funds for efforts to cement civilian control in nuclear-armed Pakistan, and supports voter education, civil society and improvements in the functioning of parliament.
But some leading political voices in Pakistan balked at what they saw as conditions on how the money could be spent, including calls for action in curtailing anti-Indian militant movements Lashkar-e-Taiba and Jaish-e-Mohammed.
The bill also called for a cut-off in security assistance if Pakistan fails to crack down on extremists.
The requirements sparked uproar in the Pakistani parliament, and were used by opponents of the government's anti-terror alliance with the United States to hammer President Asif Ali Zardari.
Obama signed the bill hours after militants unleashed coordinated attacks on Pakistani police in which 40 people died, storming offices in Lahore and bombing a station in the northwest of the country to escalate 11 days of carnage.
The assaults underscored the power of armed radicals to strike in the heart of Pakistan, and the weakness of poorly equipped security forces, despite promises of a new offensive against the Taliban.
Over 160 people have been killed in attacks in Pakistan since October 5.
White House deputy spokesman Bill Burton said Obama was "always concerned when there's a loss of innocent civilian life."
"This shows once again that the militants in Pakistan threaten both Pakistan and the United States," Burton said, adding that Obama had been encouraged by recent actions by the Pakistani military to tackle extremists.
State Department deputy spokesman Robert Wood, meanwhile, extended US sympathy to victims of the attacks, and honored "brave Pakistani military police and security personnel who are fully engaged in combating these extremists."
Fears for the package's future were quelled when Senator John Kerry and Representative Howard Berman, who head committees handling foreign relations in Congress, gave Foreign Minister Shah Mehmood Qureshi a document stating that the plan did not impose conditions or infringe on Pakistani sovereignty.
The lawmakers' statement said the aid was meant to forge a closer relationship between Pakistan and the United States, "not to dictate the national policy or impinge on the sovereignty of Pakistan in any way."
"Any interpretation of this act which suggests that the United States does not fully recognize and respect the sovereignty of Pakistan would be directly contrary to congressional intent," it said.