WASHINGTON — The Bush administration had hoped that the testimony of the top two U.S. officials in Baghdad would educate Congress about the situation in Iraq. But by the time Congress gaveled the hearings to a close Wednesday evening, Ambassador Ryan Crocker and Army Gen. David Petraeus had gotten an earful about political conditions at home.

After five years of war, the American public is exhausted by pleas for more time and doesn't feel the war is worth the cost, congressional leaders told Crocker and Petraeus. As for their advice that the situation on the ground should dictate any troop withdrawals, Democrats and Republicans said the U.S. needs an exit strategy.

The testimony and questioning turned into a battle over whose timeline would prevail.

Crocker and Petraeus outlined a strategy that could take years to fulfill, saying that a "precipitous withdrawal" would undermine the security gains of the past year. Legislators in both parties, however, called for shifting the burden to Iraqi security forces and politicians in the months ahead.

Even Petraeus' designation of Iran as "the biggest threat" to stability in Iraq failed to move Congress.

"These folks have been fighting for centuries. What are we going to do in the next six months to settle this?" asked Rep. David Scott, D-Ga.

Pentagon officials said they're aware of the growing public frustration with the war. At times, though, Petraeus and Crocker seemed flummoxed by the tenor of questions on Capitol Hill, which was starkly different from the warm reception they received during their September appearance.

There's no sign that the congressional pushback to Petraeus' plea for more time will lead to a change in strategy before President Bush leaves office in January. After the temporary 30,000 troop build-up ends in July, the administration will keep at least 140,000 troops in Iraq until conditions allow for more withdrawals.

President Bush is scheduled to speak to the nation at 11:30 a.m. Thursday about his Iraq strategy. He's expected to reduce U.S. Army deployment times from 15 to 12 months, but not to make any major policy changes.

Appearing before the House Armed Services and Foreign Affairs committees on Wednesday, Crocker and Petraeus stuck to their position that the situation in Iraq was too tenuous to set a timeline for the U.S. drawdown. Petraeus repeated his call for a reassessment that lasts at least six weeks after the last "surge" forces depart in July.

The legislators spent most of the day asking why.

"How do you know we've won?" asked Rep. Gary Ackerman, D-NY . "How do we know the Iraqis can stand up for themselves? Nobody seems to be able to answer that question."

Republican Rep. Jeff Flake of Arizona said the question wasn't partisan: "I still have a hard time seeing the big picture and what constitutes success. That is not just one side of the aisle."

The ambassador and the general said that setting a deadline would be arbitrary.

"There is not going to be ... a single moment of success, border to border. It's going to be a process," Crocker said. "It's not going to be a single dazzling moment."

Rep. Ellen Tauscher, D-Calif., rejected the argument that withdrawal had to be based on conditions in Iraq. "Those are not the only conditions we have to look at. We have to look at conditions here," she said.

About the only assurance that Petraeus could offer was that he didn't believe the U.S. would need to send more troops again once the five brigades have departed at the end of July.

"That would be a pretty remote thought in my mind," Petraeus said.

The last time Petraeus appeared in Congress, in September, he suggested that he could announce significant long-term troop withdrawals by this week. The plan was to thin out U.S. troop presence and hand responsibility over to Iraqi security forces. But the Iraqi-led offensive in the southern port city of Basra last month exposed the limits of the U.S.-trained Iraqi forces and renewed questions about Iraqi Prime Minister Nouri al Maliki's leadership.

Wednesday's House hearings were less political than Tuesday's Senate sessions, which featured all three presidential candidates, but all of Wednesday's questioners are up for re-election in November. Aware that they're about to face the voters, legislators demanded details about deployment times, equipment shortages and troop morale, and they stressed the financial cost of the war, which some estimate could reach $3 trillion.