South Yemen's President Salim Robaya Ali was overthrown and killed yesterday by rivals within his government who support a stronger alliance with the Soviet Union for the Arab World's only Marxist state.

The official radio announced the execution of Ali and two top aides after a day-long battle in Aden, the capital, in which the presidential palace was bomb and shelled.

The takeover by staunchly pro-Soviet forces was seen here and in many Arab capitals as a sharp setback for U.S. and Saudi Arabian efforts to encourage development of a moderate government in the poor but strategically located country.

Aden, South Yemen's port, is across the Gulf of Aden from the Horn of Africa and has served as an important Soviet and Cuban base for supplying arms and military personnel to assist the Ethiopian government in its wars against Somalia and secessionist guerrillas in Eritrea Province.

U.S. analysts described Abdul Fatah Ismail, the leader of the force that overthrew Ali, as a Marxist idealogue who is unswervingly loyal to the Soviet Union and predicted that the West and moderate Arab governments would find him 'very difficult to deal with."

Rep. Paul Findley (R-III.), who had twice met with Ali in Aden and is one of the few U.S. officials who has had direct contact with South Yemen's leaders in recent years, described the coup as a "very bad development for the United States."

A U.S. diplomatic mission had been scheduled to go to Aden yesterday to explore the possibility of resuming ties between the two countries, broken off in 1969. The visit has been postponed indefinitely, the State Department said yesterday. Officials also said there are no U.S. citizens in South Yemen.

Reports from Aden last night said a curfew was in effect and the country's international airport was closed yesterday. Except for the executions, there was no reports of casualties.

The overthrow came two days after the president of neighboring North Yemen. Ahmad Ghashmi, was assassinated by a bomb in a parcel brought to him by a South Yemeni envoy, who was also killed. South Yemen denied any involvement in the incident but there was speculation yesterday that the two events were somehow connected.

The Iraqi news agency, reporting from Aden, and a statement issued by the new government said Ali had tried yesterday to seize full control of the country after a policy dispute with other members of the National Front, the country's only political party.

Ali had been summoned to a meeting of the National Front's central committee, headed by Ismail, Sunday night, but had refused to come, the government statement said, adding that Ali then sent army units to shell that central committee headquarters.

In what my have been an attempt to link Ali with the assissination of the North Yemeni president, the central committee statement said the new-rulers were not responsible for "any of Ali's recent individual practices."

Observers here and in th Middle East, however, said the slaying of North Yemen's president could just as likely have been an effort by Ali's rivals to neutralize that country to prevent its interference in the coup. Relations between moderate North Yemen and radical South Yemen have been alternately hostile and hopeful for the past decade.

Prime Minister Ali Nasir Mohammed, reportedly a close ally of Ismail, assumed the presidency after the execution of Ali, Aden radio reported.

Ali, 43, and Ismail, came to power jointly in 1971 but the two were never close, either personally or politically, observers said.

Ali initially was pro-Chinese and in recent months he had angered Ismail and the pro-Soviet faction by opposing Soviet and Cuban activities in the Horn of Africa and urging better relations with moderate Arab countries and possibly the United States.

Earlier this month, South Yemen's foreign minister, Mohammed Salih Muti, visited Cuba and Defense Minister Ali Ahmed Nasir Antar, who reportedly swung his support behind Ismail at a crucial point yesterday, met with Soviet officials at the Kremlin.

U.S. analysts said that while these visits may have been related to yesterday's overthrow, such trips by South Yemen's officials have been frequent.

Special correspondent William Branigin reported from Beirut:

The new strongman, Ismail, is considered by diplomats to be the Kremlin's man in Aden. Ismail, 39, had reportedly grown increasingly alarmed by Ali's tentative recent efforts at rapprochement with the country's conservative neighbors, North Yemen and Saudi Arabia.

Some Middle East sources saw Moscow's hand behind the developments in the two Yemens. A Kuwaiti newspaper editorialized after the North Yemeni leader's assassination that the Soviet Union was trying to shift the conflict in the Horn of Africa to the oilfields of the Arabian Peninsula and the Persian Gulf in a "relentless offensive" against vital U.S. interests in the area.

The takeover in South Yemen by pro-moscow hardliners appeared to counter recent Chinese inroads into the area. Beirut political observers said. China and the sultanate of Oman, South Yemen's eastern neighbor, recently agreed to establish diplomatic relations in a joint effort to guard against growing Soviet influence in the region.

The Chinese are also trying to strengthen ties with Kuwait and Iran.