Ethiopia today formally established a communist party to rule this ancient East African nation after 10 years of revolutionary upheaval and elected its military leader, Mengistu Haile Mariam, to the key post of party secretary general.

Known as the Workers Party of Ethiopia, it takes the country one step closer to the establishment of a "people's republic" modeled on those of Eastern Europe, a step Mengistu said is his next goal along with the writing of a new constitution.

Speaking after his election to the post of party secretary general, Mengistu pledged to work for the fulfillment of the party's goals of creating a socialist country and proclaimed the government's new slogan: "Revolutionary Ethiopia or death."

The Workers Party, the first political party of any kind in this country's history, joins only a handful of other Marxist-Leninist parties in Africa, the most prominent of which are in Angola and Mozambique.

The party's founding comes at the start of celebrations marking the 10th anniversary of the military's overthrow of emperor Haile Selassie, who was one of the closest allies of the United States in Africa.

The event highlights the change in the life of this nation in just one decade -- from a feudal monarchy with close ties to Washington to a procommunist state with equally strong links to Moscow.

For many observers, the main uncertainty of the five-day congress establishing the party was whether power really was shifted from the military to civilians or whether the officers who have been running this country for 10 years merely changed titles and hats.

Elected by the party's new 136-member Central Committee to its 11-man executive Politburo were six of Mengistu's closest military colleagues; only four civilians were chosen for positions in the top ruling body. This is, however, the first time any civilians have acceded to such high posts in this hitherto military-dominated government.

The apparent shift from military to civilian rule, which the Soviet Union has long been pushing, was also left somewhat blurred by the uncertain fate of the ruling Provisional Military Administrative Council.

So far as could be determined, the council was not formally dissolved, although its seven members are now the top leaders of the party and Politburo, making it unclear why both bodies are still needed. Some reports said the council would not be dissolved until Mengistu was convinced that the new party was functioning satisfactorily and not a threat to the military.

Ethiopia has been scarred from the inception of the revolution by a bitter and often bloody power struggle between the military and civilian "revolutionaries" that has left deep distrust and delayed for years the founding of the party.

The four civilians elected to the Politburo are Shimelis Mazengia, one of the country's chief Marxist ideologues and former editor of the party's official publication; Haile Yemanu, minister of industry; Emmanuel Amde Michael, minister of justice, and Alemu Abebe, a former mayor of Addis Ababa who was educated in the Soviet Union. All four have worked closely with the military for some years.

Despite the presence of four civilians on the Politburo, the military appeared to have maintained its tight control over the party through the large number of officers and ex-officers participating in the founding congress and elected to the top posts.

In addition to Mengistu, the top members of the Politburo are Fikre Selassie Wogderess, Fisseha Desta, Tesfaye Gebre-Kidan, Berhanu Bayih, Addis Tedla and Legesse Asfaw. All are military or ex-military men who were involved with Mengistu in engineering Haile Selassie's downfall in September 1974.

At least 24 high-ranking officers were named as full members of the Central Committee as well as 16 of the 64 alternates, many of them holding the rank of brigadier general.

At the same time, statistics published during the congress indicated that nearly 69 percent of the 1,999 selected delegates were either "men in uniform" or civil servants. Observers had the impression that half or more of the 1,742 delegates who actually attended were military men or police officials. Only 19 percent of the total number were workers and 12 percent peasants, demonstrating the distance Ethiopia still must travel to establish a real workers party -- its declared goal.

The new party, which has been in the process of being organized since early 1979, reportedly is to remain a small body with only between 30,000 and 50,000 members, at least in the first stage. Most of its 13,000 to 14,000 full-time officials were sent to the Soviet Union or East Germany for intensive ideological and organizational training, indicating the extent of East Bloc help in establishing the party.

The intention in forming a communist party modeled on those of Eastern Europe and having close ties with them was made clear in one congress slogan that said, "Our revolution is part and parcel of the world communist workers' movement."

The party's flag is similar to those of other communist countries, with a crossed hammer and sickle inside a yellow star in the upper left hand corner of an all-red flag.

At the end of the congress today, Ethiopians, together with observers from 75 mostly communist foreign delegtions, stood up to sing with gusto the communist Internationale. The chief Soviet delegate, Politburo member Grigory Romanov, indicated in a speech at the congress' closing that Moscow was pleased with the outcome and hailed Ethiopia's emulation of the Soviet model of party organization.

The congress was held in a new $45 million Finnish-built hall located across from the emperor's old palace where the military council has its offices.

To judge from the tight security measures here, the government was worried that some attempt might be made by its opponents, Eritrean or Tigrean secessinonists among others, to disrupt the proceedings. There were no reported incidents, however, and the congress apparently went off without a hitch with a party platform and a new 10-year economic development plan approved unanimously.