SEOUL, JULY 10 (FRIDAY) -- It began as a memorial service and ended with a burial, but the funeral procession through two South Korean cities yesterday turned into one of the largest and most fervent rallies for democracy in the nation's history.

Hundreds of thousands of clerks, teachers, shopkeepers and students gathered here and in Kwangju to bid farewell to a university student who died Sunday of injuries he suffered when struck by a police tear-gas grenade in a rally last month. In a larger sense, they gathered to denounce the government and to cheer recent progress toward democracy.

Rather than celebrating that progress, however, many in the crowd turned out with a sense of wary determination that this time, democracy, now so tantalizingly close, will not elude them.

Against the weight of Korean history, the revived clamoring of special interests and the quickening ambitions of long moribund politicians, they seemed to say the country should pull together into a new age.

"We have come so far already," a university researcher said. "We have had our economic growth. Now we must have our political growth."

"It was just the most moving thing," said a western diplomat who marched with the vast throng from Yonsei University to City Hall Plaza downtown. "I've never seen anything like it."

The rallies in both cities degenerated into violence, including the first battle between police and students in downtown Seoul in two weeks and one of the largest this year. Yet that clash, and incidents in Kwangju, were small compared to the peaceful rallies, and both the government and the opposition played down the violence.

Politicians on both sides said they did not think the clashes would delay the framing of a new constitution.

"I think what happened is not the beginning of any new development but an epilogue to the demonstrations and protests which we have seen several weeks ago," said ruling party spokesman Hyun Hong Choo.

"It should not affect the prospect of negotiations between the parties. It should not, and I think it will not."

But, Hyun added, "This shows the rather bumpy road ahead to democratic reform. This showed that possible danger lies ahead."

Twice since South Korea's independence in 1948, authoritarian rulers have been deposed or assassinated, leading to hopes for democracy. Twice Army generals have stepped in: first Park Chung Hee, who ruled from 1960 to 1979, and then Chun Doo Hwan, who has ruled since.

Chun announced that he would set a precedent by retiring voluntarily in 1988. But when he designated a close friend and former general, Roh Tae Woo, as his desired successor, many people doubted that he would cede power in fact as well as in name.

Chun announced today that he is relinquishing his post as president of the ruling Democratic Justice Party in favor of Roh. Chun said he would dedicate himself to running the country from a "suprapartisan position" during his remaining months in office.

Officials here said the move is unlikely to affect Chun's real power, but would enhance Roh's stature while responding to demands by opposition leaders who said Chun should remove himself from politics before elections scheduled for the fall.

Demanding a more open political process, thousands took to the streets in June. Although most of the marchers were students, many in the middle class supported the protests. After considering a military crackdown, the government reversed course and promised almost everything the opposition had demanded: the direct presidential elections this fall, increased freedom of the press, amnesty for political prisoners. During the past few days, it made good on many of those pledges, freeing 357 prisoners, restoring civil rights to 2,300 former prisoners, promising expelled students they could return to school and, last night, removing 270 names from the "watch list" of fugitive dissidents.

Still, serious problems remain. The opposition maintains that many political prisoners remain behind bars, while the government says those still locked up are criminals or communists. Prisoners' families will pressure the opposition Reunification Democratic Party not to participate in the political process unless more are freed.

Opposition leader Kim Dae Jung, his rights restored by political decree yesterday after years of government persecution, sounds like a presidential candidate. People fear that he and Kim Young Sam, the other opposition chief, will now engage in a debilitating clash, as they have in the past.

The nation's vast police, intelligence and military bureaucracies remain apprehensive about the pace of change. Although almost everyone here says the military does not want to engage in politics again, no one can discount the possibility.

And if the main opposition and the ruling parties begin negotiating next week on a new constitution, as planned, they will have significant differences to resolve: on voting age, the strength of the presidency and the rhetoric of the preamble.

The rally itself showed both the strength of democratic yearnings here and some of the pitfalls that stand in the way. The procession honored Lee Han Yol, 21, who was injured during a June 9 rally.

Tens of thousands of students and other sympathizers gathered at Yonsei University for an initial service. As they carried the coffin through Seoul's streets, tens of thousands more joined in.

Every rooftop along the route was lined with spectators, and at every window workers jockeyed for space to watch and, often, cheer.

Most remarkably in this city accustomed to confrontation, almost no police were in sight. Student marshals controlled the huge crowds.

By the time the procession reached City Hall, the vast plaza there was nearly full. Korean newspapers variously estimated the crowd from 200,000 to 1 million; the national police at 150,000.

In Kwangju, a southern provincial capital near the dead student's hometown, at least 100,000 more greeted the procession last evening and Lee was finally interred at the cemetery shortly before 10 p.m. Despite a history of antigovernment sentiment, Kwangju was largely peaceful.

In Seoul, violence flared only after the procession had departed and many demonstrators had left. A group of up to 30,000 marchers, mostly students, left the plaza, vowing to reach the Blue House, Chun's official residence. Blocking their way were rows of riot policemen, with thousands more in side streets. When the marchers reached the human barricade, police unleashed tear gas.