SEOUL, OCT. 8 -- President Roh Tae Woo fired his defense minister and army intelligence chief today amid revelations of a domestic spying program that have raised damaging questions about the military's involvement in political affairs.

Roh's action came four days after an army private who had deserted from the sensitive Defense Security Command (DSC), an army intelligence unit, disclosed the spy program by showing reporters computer discs and dossiers that contain information secretly gathered on about 1,300 politicians, religious figures, journalists, labor leaders and student activists.

Surveillance targets included Roman Catholic Cardinal Kim Sou Hwan, longtime opposition leader Kim Dae Jung and even the current ruling party chairman, Kim Young Sam, who had been a leader of the opposition until joining forces with Roh earlier this year.

Some government and military officials acknowledged that such files were kept on certain people but said the effort was aimed at ensuring the military could protect the 1,300 civilians under surveillance in case of an emergency or war. The files have been kept for many years, some officials said, with the program becoming more active in 1979 after a coup by strongman Chun Doo Hwan.

Details released in the past few days show that DSC investigators filed monthly reports on the activities of each surveillance target. According to the man who left the command, Pvt. Yoon Sok Yang, the DSC had even operated a coffee shop near a major university to eavesdrop on student patrons.

The files revealed by Yoon, who apparently went into hiding, included lists of people whom each target had met, layouts of their homes and copies of speeches they have made. For filing purposes, each target was assigned a number and those under surveillance were divided into subgroups according to their profession, Yoon said.

The Defense Ministry said last week that the data and other materials had been stolen from the security command.

The scandal appears likely to worsen the political stalemate that has developed in South Korea between opposition forces and the ruling party led by Roh, who commanded the DSC a decade ago.

Kim Dae Jung, whose supporters walked out of the National Assembly in July to protest what they said was the government's procrastination on democratic reforms, began a hunger strike today. Contending that Roh's dismissals were superficial gestures, Kim is demanding the dissolution of the powerful DSC, the holding of long-delayed local elections and a government pledge not to use its legislative majority to amend the constitution.

Defense minister Lee Sang Hoon, who according to a presidential spokesman took responsibility for the surveillance, and DSC commander Cho Nam Pung were dismissed today, and a former commander of the DSC, Lee Jong Koo, was named new defense minister. He did not make clear whether he intends to discontinue the civilian surveillance program, which is believed to be seen as essential by some generals in order to provide the military with its own source of information about potentially troublesome civilians.

Local newspapers reported that some DSC officers face discipline and possible court-martial -- not for domestic spying but for allowing the computer discs and documents to slip out of their hands. An arrest warrant has been issued for the private who sparked the scandal by deserting the DSC and filching the classified information.

Roh, a former general, was elected president over a divided opposition in 1987 and pledged to steer the country away from its legacy of harsh military rule. The military's influence over politics has declined since then but the scandal has focused renewed attention on South Korea's powerful generals.

Roh's dismissals of Lee and Cho would have been unthinkable during the years of military rule and are a sign of the changes that have taken place under Roh. But he is still remembered by some South Koreans for the key role he played in the 1979 coup staged by Chun, and the DSC scandal threatens to throw new doubt on his stated sincerity in ridding South Korea of military control.

The DSC's key intelligence function is to ensure that North Korean spies do not infiltrate the military. Radical students have frequently accused the DSC of spying on them, and many political observers found their charges credible although proof was elusive.

Although it is not involved in the military scandal, the National Security Planning Agency, referred to as the KCIA, operates its own vast surveillance network.