Democrat frontrunner John Kerry has won a close race with John Edwards in the Wisconsin state primary.
Mr Kerry has had strong support from his wife Teresa
Mr Kerry, 60, who won 14 of 16 previous contests to find a challenger to George W Bush, took 40% of votes after a late surge by his rival who got 34% support.
Mr Edwards said he had been surprised by the strength of the increase in backing across the battleground state.
Howard Dean, who had also hoped to slow Mr Kerry's momentum, was in a distant third place.
The former Vermont governor had promised to quit the race for the Democratic Party nomination if he did not win Wisconsin, but later changed his mind.
"We are not done," he told supporters in the state capital, Madison.
Mr Dean claimed credit for changing his party, saying: "Finally Democrats in Washington have learned that they can stand up to the most right-wing president that we've had in my lifetime, and that - guess what - if you stand up and you say what you believe, the voters actually like it."
But the BBC's David Willis in Madison says his options for this presidential race are dwindling.
By contrast, our correspondent adds, Mr Edwards is reaping the benefits of intensive campaigning in Wisconsin and believes he could yet make it a two-horse race with Mr Kerry.
Mr Kerry appeared unconcerned by the closeness of his victory, saying "a win is a win".
He told supporters in Middleton: "We reject the view that a president's job is just to raise the value of the stock market. We believe that the job of the president is to put America back to work and to do it now."
For his part, Mr Edwards was jubilant at his strong showing.
"Today the voters of Wisconsin sent a clear message. The message was this: objects in your mirror may be closer than they appear," he said in Milwaukee.
A poll on the eve of the vote indicated Mr Kerry had a 24-point lead over Mr Dean in Wisconsin, with Mr Edwards on just 20%.
But a high turnout by Republicans and independents appears to have helped Mr Edwards, with polls indicating that he had received as many Republican votes as Mr Dean and Mr Kerry combined.
Wisconsin is an open primary, which does not restrict voting to Democrats alone.
Mr Edwards - who so far has only won his native state of South Carolina - said he had commitments in each of the 10 states to vote on the so-called Super Tuesday of 2 March.
Mr Dean, however, is returning to his home state and is reported to have no appearances scheduled.
DELEGATE COUNT: LEADING CANDIDATES
Most delegates who vote for a candidate at the national presidential nominating convention are allocated according to a candidate's support in state-wide caucuses or polls; some delegates are assigned for party leaders and elected officials to allocate.