SEOUL, Dec. 18 -- South Koreans go to the polls Thursday in a presidential election that could determine whether they continue their country's close embrace of the United States or set out on a more independent course.

The election-eve collapse of a political alliance involving the apparent front-runner may work in favor of a hawkish candidate, Lee Hoi Chang, who supports keeping U.S. troops here and has vowed to adhere to Washington's hard line in relations with troublesome North Korea.

The late development was a setback for Roh Moo Hyun, a former activist who balks at President Bush's policies and promised to resist blind loyalty to the United States.

Roh had been seen entering Election Day with a slight lead. But after he suggested at a campaign rally today that South Korea should not automatically back the United States in any conflict with North Korea, a key supporter pulled out and the midnight political drama left him scrambling to try to salvage his candidacy.

Roh's comments touched on the campaign's most emotional issue for many voters, who feel squeezed between what they see as U.S. arrogance and North Korean belligerence. The remarks also prompted the withdrawal of his official political partner, the former chief of the World Cup, Chung Mong Joon.

Roh said he was misunderstood and declared that South Korea's alliance with the United States is "the basis of our security." But when he made a hasty trip to Chung's house tonight, the door remained locked.

Until the bombshell announcement, Thursday's election was seen as a close test between Roh, a labor lawyer critical of the dominant U.S. influence, and Lee, a conservative who has vowed to end South Korea's "sunshine policy" of friendly dialogue with North Korea.

The victor will replace Kim Dae Jung, the Nobel Peace Prize-winning president, whose star has abruptly faded, and whose term expires in February. Kim cannot run again because South Korea limits presidents to a single five-year term.

Much of the campaign debate centered on Roh's appeal for more national pride and a policy of independence from the United States. Although Roh, a member of Kim's Millennium Democratic Party, denied he wants to end a half-century alliance with the United States, which keeps 37,000 troops in South Korea, he said at a rally this afternoon that "we should proudly say we will not side with North Korea or the United States."

At another rally Tuesday evening, Roh suggested that in the event of a fight between North Korea and the United States, South Korea might attempt to mediate.

Even as Roh raced to Chung's house at midnight to try to persuade him to cancel the political divorce, his opponent's aides were billing the development as a victory-clincher for Lee.

"This will win the election for us," said Park Won Hong, a Grand National Party assemblyman and adviser to Lee.

The campaign already had been shaken by unexpected events. A U.S. military court's acquittal of two soldiers involved in a fatal highway accident here fueled resentment toward U.S. power and privilege, boosting Roh's popularity.

But the revelation that neighboring North Korea is attempting to develop nuclear weapons served to underscore the importance of the U.S. troops stationed in South Korea, adding to support for Lee.

Both candidates have suggested the other is dangerous.

"They say if I become president, there will be a war," Lee told cheering supporters at a rally here tonight. "Something like that would happen only if North Korea looks down at the South Korean president. If I'm elected, that would not happen."

"We almost went to the brink of war in 1993 with North Korea, and at the time we didn't even know it," Roh said of the U.S. plans to bomb nuclear plants in North Korea. Under his opponent, Roh said, the United States would continue to take South Korea's acquiescence for granted.

"We don't want to become spectators again," he said. "In the old days, we were not able to solve our problems ourselves. Now it is different. We should say with confidence what we want and what we demand."

Questioning the alliance between the United States and South Korea would have been considered traitorous little more than a decade ago under Seoul's military dictators, and at least far-fringe radical in most of the years since. But Roh's message is now sufficiently mainstream that both parties said this week that he was slightly ahead in the polls.

And both sides agree that this election presents voters with a sharp philosophical choice that has split South Koreans by ideology and age.

"Never before in Korean election history has the older generation come out so publicly to call to the younger generation to understand the need for this country not to lose what we gained in the Korean War," said the chairman of Lee's Grand National Party, Suh Chung Won, in an interview here.

Roh, 56, a self-taught lawyer from a poor family who fancies comparisons of himself with Abraham Lincoln, earned public recognition in the street-tough politics of labor activists and anti-establishment civic groups. He once called for the removal of U.S. troops -- but now says that was rash.

"The Cold War is over. We need a new partnership" with America, said Lee Hae Chan, an assemblyman and chief strategist for Roh.

And Roh balked at the Bush policy of trying to isolate North Korea, rather than negotiating, to force it to abandon its nuclear program. Instead, he favors a continuation of Kim's sunshine policy. "In no circumstances will we cut our dialogue with North Korea," he said.

Lee, 67, by contrast, has declared that "the sunshine policy is a failure," and vows to hew closely to the Bush administration's tough line against North Korea to try to force it to give up its uranium enrichment program.

Lee won political esteem with a reputation for unusual honesty and probity in a political system rife with chicanery and envelopes stuffed with cash. Despite that contrast, he is viewed as one of the last of the old guard of war-era politicians.

Since the mid-1990s, he has been leader of a party that inherited South Korea's feeling of indebtedness and dependence on the United States. Lee and his party see no choice but to rely on America's protection from North Korea, and to follow its political lead in dealing with the recalcitrant regime. The alternative, they say, is to shoulder a huge burden for South Korea's defense.

"It's not a question of being 'pro' or 'anti' the United States," Lee said at a news conference today. "It's a matter of necessity for South Korea's prosperity. Roh does not recognize that."

But Lee, too, has tried to lure the "undecideds" among South Korea's 35 million voters by edging toward sharper criticism of the agreement under which U.S. troops are stationed here. Those swing voters are thought to be mostly in their forties, and analysts say they hold the key to the election.

Four other candidates are in the race. One, socialist Kwon Young Ghil, could cut into Roh's left-leaning support group and tip a close election in Lee's favor, according to Hahm Sung Deuk, an analyst at Korea University.

Special correspondent Joohee Cho contributed to this report.

Lee Hoi Chang favors keeping U.S. troops in South Korea and has vowed to end "sunshine policy" with North Korea.Candidate Roh Moo Hyun suggested at a campaign rally that South Korea would not automatically back the United States in the event of a conflict with North Korea.