Monday's hearing, before the House Foreign Affairs and Armed Services committees, was the first of a series of appearances by Petraeus and Crocker. The two men are to appear before the Senate today and to take questions from the news media later in the week.
Also later in the week, Bush is expected to outline the Iraq strategy he hopes to pursue in the months ahead.
Both Petraeus and Crocker said it would be possible for the United States to stabilize Iraq. But they cautioned that progress would require a long-term U.S. presence.
Crocker credited the U.S. troop buildup with preventing a worsening of sectarian violence, which gripped Iraq in 2006.
"The country came close to unraveling politically, economically and in security terms," he said, adding that "2007 has brought improvement."
Pointed questions
Petraeus began the day enveloped in unexpected controversy: A full-page ad sharply critical of him appeared in the New York Times. Placed by the liberal advocacy group MoveOn.org, the ad was headlined, "General Petraeus or General Betray Us? Cooking the Books for the White House."
Although one of the most respected officers in the Army, Petraeus has become a controversial figure. Bush's constant references to Petraeus over the months have linked the general to the unpopular president, at least in the minds of many Democrats and war critics.
Rep. Robert Wexler (D-Fla.) suggested that Petraeus was "cherry-picking" statistics and noted that civilian deaths in 2007 were greater than the previous year.
"I do not question your credibility. You are a true patriot. I admire your service to our nation. I do question your facts," Wexler said.
Petraeus emphasized his independence, insisting that his recommendations were his own.
"I wrote this testimony myself," he said.
"It has not been cleared by nor shared with anyone in the Pentagon, the White House or the Congress."
The view from Iraq
Petraeus sought to acknowledge instances where he thought progress had failed to materialize, even as he highlighted what he said was improving security.
Sectarian violence is down 55% across Iraq and down 80% in Baghdad since December, he said. But violence remains high, he said.
The Iraqi public itself is skeptical of the surge, according to a survey released Monday by ABC and broadcasters in Britain and Japan. Many believe security has worsened since the buildup began, and most think that the U.S. invasion was wrong and that attacks on U.S. forces are acceptable, the survey found.