Sen. John Kerry of Massachusetts won the Iowa Democratic presidential caucuses Monday night, completing an improbable charge in the final days of the first important test of the campaign season.

Kerry and Sen. John Edwards of North Carolina appeared to break away from the rest of the field, running far ahead of former Vermont Gov. Howard Dean and Rep. Dick Gephardt of Missouri. Gephardt will drop out of the race Tuesday, aides told NBC News.

Kerry won the support by 38 percent of caucus-goers with almost all of the state’s 1,993 precincts reporting. Edwards ran a strong second at 32 percent.

Appearing before ecstatic supporters after an introduction by his Massachusetts colleague in the Senate, Edward Kennedy, Kerry thanked Iowans for making him “the comeback Kerry.”

“Now you send me on to New Hampshire ... and I make you this pledge: I have just begun to fight,” he said, adding that he had a message for President Bush: “We’re coming, you’re going, and don’t let the door hit you on the way out.”

Kerry attributed his victory to Iowans’ willingness to ignore pundits who predicted his defeat.

“Iowans were magnificent,” he said in an interview on MSNBC’s “Countdown.” “ ... They were serious. They looked into our eyes. They checked our guts.

“I think Senator Kerry and Senator Edwards did a great job,” Dean said in an interview on MSNBC’s “Hardball.” “We came in third. I would have liked to have come in first, but we didn't.

“... Actually, it looks better than it should,” he told “Hardball” host Chris Matthews. “Had you told me a year ago that I was going to finish third in Iowa, I would have been delighted, because the top three in Iowa is the ticket out, so we're going to go on in New Hampshire, and we’re going to win, period.”

Later, punching the air in a gesture of triumph and waving a U.S. flag he picked up from the audience, Dean reassured his supporters that the third-place showing was only a bump in the road.

“We will not quit!” Dean shouted repeatedly, his voice raw and cracking from days of nonstop campaigning. "We will not quit, now or forever. We want our country back for ordinary Americans."

No more for Gephardt?
For Gephardt, who won this contest in 1988, Iowa was probably the end of the line. He trailed badly, with only 11 percent.

“Well, this did not come out the way we wanted,” Gephardt told chanting supporters in Des Moines. Campaign aides told NBC News that he would withdraw at a news conference Tuesday afternoon, and Gephardt
signaled his intentions
by acknowledging that “my campaign to fight for working people may be ending tonight, but our fight will never end.”

“Life will go on because this campaign was never about me. It was about all of us,” said Gephardt, who promised to support the eventual nominee “in any way that I can.”

Dean said in an interview on CNBC: “I give my condolences to Dick Gephardt. He’s a good friend. I worked with him in ’88 — this I know is a tough one for him.”

Kerry, meanwhile, praised Gephardt as “a special public servant ... who has served his country with great distinction.”

Edwards scores big
The big surprise was the strong performance by Edwards, who, even though he saw a spike in support in the final tracking surveys, said he had not expected to do so well.

Edwards’ campaign manager, Nick Baldick, told MSNBC-TV: “Now we have the wind at our backs. We have New Hampshire, and we'll meet you in Columbia [S.C.] on February 3rd.”

Rep. Dennis Kucinich of Ohio had been expected to make a significant showing at a few of the caucuses, but he ended up with just more than 1 percent support.

Kerry reels in Dean
Kerry’s victory in percentage terms will not translate exactly into delegates at the state Democratic convention next summer, which will apportion Iowa’s delegates to the national convention. The actual results, compiled precinct by precinct, indicated that Kerry would win 20 of the state’s 45 delegates, compared to 18 for Edwards and 7 for Dean, according to an analysis by NBC News.

Still, his victory was sweeping, according to a survey by NBC News and other news agencies as voters entered the caucus sites. He ran first among men and women and among all income and education levels, and he swept almost all age categories.

Just weeks ago, before the Iowa race turned testy and tumultuous, Dean was the undisputed front-runner. But tracking surveys in the last week showed Kerry gaining swiftly, and by Monday he held a slim lead in the MSNBC/Reuters/Zogby tracking poll, with 25 percent to Dean’s 22 percent.

As Gephardt continued to slide in the final days, he opened a harsh attack on Dean, and that may have contributed to the unexpectedly weak showing by each.

“We were just getting hammered,” Dean’s campaign manager, Joe Trippi, said on “Hardball.” “We lost control of our message.”

In the last week of the campaign, “John Edwards and John Kerry started sounding a hell of a lot more like Howard Dean,” Trippi complained. And “Dick Gephardt, in a fight for his life, just pummeled us.”

The caucus system rewarded candidates who picked up support late. Once they arrived at the caucus sites, voters broke up into groups, their numbers counted and then recounted as some candidates did not get enough votes to go forward.

That made turning out supporters critical, and weeks of touting proposals and criticizing rivals in appearances across this farm state focused on getting people to precinct meetings from public buildings to private homes.

The entrance survey showed that fully 41 percent of voters made up their minds in the last three days. More than half, 55 percent, had never taken part in the caucuses previously.

Iowa Secretary of State Chester J. Culver had predicted that turnout could top the record of 125,000 set in 1988, but the Democratic Party estimated turnout Monday night at 110,000. Still, Democrats ran out of registration forms at Precinct 21 in Iowa City.

Two other major contenders — Sen. Joseph Lieberman of Connecticut and retired Army Gen. Wesley Clark — skipped the caucuses to seek support for
New Hampshire on Jan. 27
.

MSNBC.com's Alex Johnson, MSNBC-TV’s David Shuster, Priya David and Michelle Jaconi contributed to this report.