The new Marxist president of Afghanistan said tonight that when he seized power Friday he had "eliminated" some of his opponents, indicating that the takeover had been a violent one.

Among those thought to have been at least wounded in fighting at the former royal palace in Kabul was Nur Mohammed Taraki, the former president.

In his radio address tonight, the new president Hafizulla Amin, gave no report on Taraki's fate. When the change in power was announced Sunday, it was said that Taraki was resigning for reasons of health.

Further evidence that Amin took over in a coup was a separate government announcement today that four officials were killed at the palace Friday night. Only one of the dead was identified. He was Sayed Daoud Taroon, the chief of Cabinet and personal bodyguard to Taraki.

In his address, monitored here, Amin said that "the people who saw their greatness in the oppression of the people have been eliminated."

Observers here noted that "eliminated" was the same word used in April 1978 to record the violent death of Mohammed Daoud, whose government was overturned in a bloody coup carried out by Taraki and his followers.

The consensus among diplomats here and in Pakistan is that the sudden seizure of power came as a complete surprise to the Soviet government which had strongly backed Taraki.

The Kremlin had been seeking to broaden the base of the Taraki government in an attempt to quell the spreading rebellion by Moslem tribesmen. The Soviets have poured arms, money and military advisers into Afghanistan to fight Moslem tribesmen who were battling the "godless communism" of the central government and who feared that its reforms conflicted with their traditional values.

According to most observers of Afghanistan here, the strongest indication that the Soviets knew nothing of Amin's plans to grasp power himself was the bear-hug welcome that Soviet President Leonid Brezhnev gave Taraki in Moscow last week.

Brezhnev today congratulated Amin on becoming his country's new leader, according to the Soviet news agency Tass.

"We express confidence that fraternal relations between the Soviet Union and revolutionary Afghanistan will be further developed successfully," Tass quoted Brzhnev's message as saying.

Moreover, reports from Kabul said that Soviet advisers and their families were strolling the streets when gunfire rang out Friday, instead of being safely in their compound as they usually are when they know trouble is brewing."

It appears that Amin preempted an attempt by the Soviets to cut his power, one non-Western diplomat said.

The new government stands on the same slim base as Taraki's. It consists of about 4,000 members of the Khalq Party who are mostly Western-educated and who have little in common with the nomadic tribesmen who make up the bulk of Afghan's population.

White Amin tonight claimed the support of the army, some diplomats here said he may have alienated key members of the officer corps by dismissing the last two military men in the cabinet.

Amin, a 50-year-old former school teacher who was educated in the United States, now holds all power. He is president of the revolutionary Council, secretary general of the Peoples' Democratic Party, premier and defense minister.

Considered brilliant but ruthless, Amin over the past 17 months has placed his allies and relatives in key government posts and has taken control of the secret police.

Nonetheless, Amin said Sundays' change in government marked the end of a cult of personality. This was an obvious reference to Taraki, a philosopher-poet of the government who had been lionized in street banners as "great leader," "genius leader" and "son of the Afghan people."

In his speech tonight, Amin also promised to free all political prisoners who are "unnecessarily held"; to end unnecessary arrests, and provide freedom and safety for religious leaders.

"All atrocities by members of government will not be tolerated any more," he said, obliquely confirming reports of mass tortures, killings and the jailing of tens of thousands of political prisoners.

Amin also said he would try to normalize relations with the governments in the neighboring states of Iran and Pakistan, who have been attacked by both Afghanistan and the Soviet Union for aiding the rebellion by Moslem tribesmen.

According to analysts here, the takeover leaves the Soviets in a more precarious position than they were in before. They have little choice but to support him since there are no logical and widely recognized successors left among the Khalq Party. But unless Amin's government gains wider support, the Soviets are likely to be dragged deeper into the quagmire of fighting the rebellious tribesmen.

"The Soviets are caught," said one Asian diplomat here. "The momentum has carried them to thepoint where whether they like it or not, they may have to get more involved."