SEOUL, JULY 6 -- Twelve leading South Korean dissidents, arrested for organizing a major opposition rally June 10, were freed from prison today, beneficiaries of the unexpected success of the movement they helped create.

President Chun Doo Hwan promised to free the 12 opposition leaders and other political prisoners as part of a major package of democratic reforms offered after the June 10 rally sparked three weeks of street demonstrations in cities throughout South Korea. Chun also promised a new constitution that will allow direct presidential elections this fall.

The dissidents, wearing the white uniforms of Korean convicts, emerged at noon to a tumultuous welcome from hundreds of supporters, including opposition leaders Kim Dae Jung and Kim Young Sam.

Among those released by the government were Christian and Buddhist leaders and Yang Soon Jik, a vice president of the opposition party.

"We never expected that June 10 would bring such a big change," said the Rev. Park Hyung Kyu, 63, who survived his sixth imprisonment since 1973. "There have been so many failures before. . . But I think this time they cannot return to repressive measures."

The government also freed 165 students and demonstrators who had been detained since the June 10 rally. Officials said that hundreds more will be released later this week.

Meanwhile, clashes between demonstrators and police continued for the second day at Seoul's Yonsei University, where about 7,000 students attempted unsuccessfully to march off campus. Riot police turned them back with tear gas, while students hurled rocks and flailed at police with sticks.

About 30 police officers and students were injured during three hours of skirmishes, government television reported tonight.

The students had assembled in memory of Lee Han Yol, the 21-year-old Yonsei student who died Sunday after being hit in the head by a police tear-gas grenade June 9. Lee was the first student to die as a result of the protests, although one other demonstrator and one policeman also have been killed.

In an effort to calm tensions that have reemerged since Lee's death, the government announced that after his funeral Thursday it will investigate whether police behaved properly during the rally near Yonsei in which Lee was killed.

Without waiting for that inquiry, the government also fired the police station chief in charge of the district where the rally took place, government television reported tonight.

Despite government wariness and the bitterness of today's clashes at Yonsei, there were signs that many here do not want Lee's death to disturb the prevailing mood of reconciliation. Demonstrations have not spread from Yonsei, and both the ruling Democratic Justice Party and the opposition Reunification Democratic Party said today that despite delays caused by Lee's death, they will be ready for negotiations next week to pave the way for fall presidential elections.

"Before the {government} statement on elections, I thought Lee's death would be the beginning of another movement," one antigovernment church worker said. "Now, I think we'll just express our sorrow."

The June 10 rally protested a ruling party meeting the same day at which ruling party chairman Roh Tae Woo was nominated to be Chun's successor.

Chun has said he will be the first modern South Korean leader voluntarily to relinquish power when he steps down next Februrary, but his efforts to designate his replacement angered many Koreans.