President Chun Doo Hwan today commuted the death sentence for sedition against opposition leader Kim Dae Jung to life imprisonment. His action came shortly after the country's Supreme Court rejected an appeal against the sentence imposed by a military tribunal.

The move followed a Cabinet recommendation for commutation of the sentence after the high court ruling and it clears the way for Chun's state visit to Washington, which begins next week.

A Cabinet report quoted Chun as saying at the meeting prior to his ruling that clemency should be considered because of appeals from friendly foreign countries and to avoid more divisiveness at home.

"The time has come to usher in a new historical era by ending the confrontation-dominated political situation of the 1970s," Chun advised his Cabinet.

He said that Kim had expressed "repentance" for encouraging danger to national security and he added that it is a South Korean tradition to treat "magnanimously" those who repent.

The Cabinet also recommended the lifting tonight of a martial-law edict issued last May at the start of a military crackdown against dissidents.

Chun's decision to commute the sentence to life imprisonment was the last level of appeal for Kim, the country's most prominent opposition leader, who has been a strong critic of two South Korean military-backed governments for more than a decade.

The surprise announcement this week that Chun had been invited to meet with Reagan had fueled speculation that the former Army general would grant clemency in the controversial case.

Kim's fate has been a divisive issue between the two countries, with U.S. officials exerting pressure for his life to be spared. A state visit by Chun seemed unlikely as long as Kim's fate was uncertain.

The 56-year-old Kim was arrested last May in the military crackdown that elevated Chun and a group of Army colleagues to total power in the country.

He was accused at a court-martial of having fomented sedition by instigating the bloody uprising at Kwangju and other antigovernment demonstrations. He was also charged with having led an anti-Korean movement in the United States and Japan during the period when he was in exile during the early 1970s.

Kim denied virtually all the charges. But on Sept. 17 he was sentenced to death. An appeals court upheld the verdict and the supreme court's decision this morning left the final decision to the president.

The case had brought heavy international pressure on Chun's government from the United States, Japan, West Germany and several world organizations involved with cases of political prisoners.

The U.S. State Department had called the charges against Kim "farfetched." Japanese leaders had considered cutting off economic aid to South Korea if Kim were executed.

On several occasions, the Carter administration warned Seoul that the execution of Kim would have serious repercussions on relations between the two countries.