ISLAMABAD – Islamist terrorists may exploit the chaos and misery caused by the floods in Pakistan to gain new recruits, the country’s president warned Thursday — remarks echoed by a U.S. senator who said America would stand by its vital wartime ally during the crisis.

The floods have affected 20 million people and about one-fifth of Pakistan’s territory, straining its civilian government as it also struggles against al-Qaida and Taliban violence. Aid groups and the United Nations have complained that foreign donors have not been quick or generous enough given the scale of the disaster.

“All these catastrophes give strength to forces who do not want a state structure,” President Asif Ali Zardari said during a news conference with John Kerry, chairman of the Senate Foreign Relations Committee, after the two visited some of the country’s hardest-hit areas and a relief camp.

“There is a possibility that the negative forces would exploit the situation,” Zardari said. “Like they would take the babies who have been made orphans and take them to their camps and train them as the terrorists of tomorrow.”

Zardari’s government has been criticized for failing to respond quickly enough, and Islamist charities — at least one of which has alleged links to terrorism — have been active in the affected areas.

There also are concerns the scale of the suffering could stoke unrest and political instability that may distract nuclear-armed Pakistan from the fight against the Taliban. The military has had to divert thousands of soldiers and equipment from battling the militancy to rescuing flood victims.

More than three weeks after the flooding began, the United States, Germany and Saudi Arabia announced new pledges of aid, while Japan said it would send helicopters to help distribute food, water and medicine. The Asian Development Bank said it would redirect $2 billion of existing and planned loans for reconstruction.

“If we don’t do it quick, if we don’t do it well, what will the Pakistani people think?” asked Juan Miranda, the bank’s director general for Central and West Asia. “We have to put every road and every bridge back into the shape where they should be.”

The United States has dispatched 19 Army helicopters to hard-hit areas and given other aid worth $90 million. Kerry said the monetary assistance would increase to $150 million.

Washington’s primary concern is humanitarian, Kerry said, while adding, “Obviously there is a national security interest.”

Richard Holbrooke, the U.S. special representative for Pakistan and Afghanistan, told the Asia Society in New York that the United States was the first and largest contributor, and he challenged other countries, especially Pakistan’s close ally China, to “step up to the plate.”

Pakistan is vital for America’s strategic goals of defeating militancy and stabilizing neighboring Afghanistan so U.S. troops can one day withdraw. Before the floods, Washington had already committed to spending $7.5 billion over the next five years on humanitarian projects in Pakistan.