President Barack Obama's choice for U.S. ambassador to Afghanistan insisted on Wednesday that the United States must continue its multibillion-dollar investment to achieve a "good enough" government in Kabul that would prevent the country from backsliding into a sanctuary for terrorists.

Ryan Crocker was challenged repeatedly by skeptical senators who questioned a costly war now in its 10th year and nation building that a fresh congressional report found has had limited success despite nearly $19 billion in foreign aid over a decade. That is more than the United States has spent in any other country, including Iraq.

"Our current commitment, in troops and dollars, is neither proportional to our interests nor sustainable," said Democratic Sen. John Kerry, chairman of the Senate Foreign Relations Committee.

Looming large as senators pressed Crocker to state an Afghanistan end game was Obama's coming decision on how many of the 100,000 American troops to withdraw from Afghanistan in July. The killing of Al Qaeda leader Usama bin Laden, reservations about unreliable ally Pakistan and significant U.S. budget constraints have forced even the more hawkish members of Congress to rethink continued U.S. involvement in Afghanistan.

The administration has not said what will be the size of the drawdown or whether it will include combat troops.

On a glide path to Senate confirmation, Crocker said the United States cannot afford to abandon Afghanistan, where the realistic goal is a relatively stable government rather than creation of "shining city on a hill."

"Governance that is good enough to ensure that the country doesn't degenerate back into a safe haven for Al Qaeda," Crocker told the Foreign Relations panel.

He recalled Defense Secretary Robert Gates' warning that the United States walked away from Afghanistan in 1989 with disastrous consequences.

"We cannot afford to do so again," said Crocker, who argued progress is hard, "but hard does not mean hopeless."

Democratic Sen. Chris Coons, summed up the frustration of lawmakers.

"If we're not going to walk away, how long are we going to stay and at what level?" Coons asked.

Crocker said bluntly. "I just don't know the answer now."

He said the goal was to avoid a return to an Al Qaeda haven.

"The trick is, how do you do it and how much does it cost and how long does it take?" he added.

The career diplomat, who served in Beirut, Baghdad and Islamabad, pointed to the coming transfer of control of seven provinces and districts to Afghan authority, a significant step as the United States pushes toward removing all its troops by 2014.

But that prompted Democratic Sen. Jim Webb to argue that it does not necessarily guarantee a blow to enemy forces, who can move.

"International terrorism and guerrilla warfare in general is intrinsically mobile. I fought a guerrilla war in Vietnam," Webb said.

Kerry and the panel's Democrats released a report late Tuesday that found that despite $18.8 billion spent by the U.S. to help stabilize and build up Afghanistan, that nation is at risk of falling into financial crisis when foreign troops leave in 2014.

Misspent foreign aid can result in corruption, alter markets and undercut the ability of the Kabul government to control its resources, said the report, which was posted Tuesday night on the Senate committee's website. The World Bank found that a whopping 97 percent of the gross domestic product in Afghanistan is linked to spending by the international military and donors.

Crocker said corruption "totally unchecked becomes ... a second insurgency."

The State Department and the U.S. Agency for International Development are spending about $320 million a month on foreign aid there, relying on the money to "win hearts and minds." Among the successes has been a sevenfold increase in the number of children attending school and gains in health care.

The report said, however, that the United States must take a closer look at how it spends the money, relying heavily on contractors. The U.S. must do a better job of oversight, especially as it funds more aid through the Afghan government. One recommendation was to standardize Afghan salaries and work with the government on staff limitations.

The panel's Democrats also suggested that Congress implement multiyear aid programs and closer scrutiny of stabilization programs.

"Transition planning should find the right balance between avoiding a sudden drop-off in aid, which could trigger a major economic recession, and a long-term phase-out from current levels of donor spending," the report said.

State Department spokesman Mark Toner said the administration welcomed but did not endorse all the conclusions in the report.

"I think that USAID is already addressing many of the issues that were raised in the report concerning sustainability and oversight. And you know, we've undertaken, we believe, in the past years some good efforts to change the way we do business," Toner said.

Republicans and Democrats are pressing for a robust drawdown of the U.S. forces from Afghanistan, especially in a time of serious U.S. financial problems. The administration is seeking about $3.2 billion in foreign aid for Afghanistan in next year's budget, an amount likely to be closely reviewed.

Senate Armed Services Committee Chairman Carl Levin, a Democrat, has suggested a cut of 15,000 U.S. troops by year's end, including combat troops. But the panel's top Republican, John McCain of Arizona, said he stands with Gates for a more modest drawdown and no combat troops.

McCain said the administration would make a cut of 15,000 "if you want to lose."