Tanzania has begun to withdraw its troops from strife-torn Ugnada, a move bound to increase instability in a country that has endured a decade of bloodletting and chaos under dictator Ida Amin and his four successors.

The scheduled withdrawal of the 10,000 troops by the end of June will leave security in the East African country in the hands of Uganda's ragtag 5,000-man Army. In the two years since the Tanzanian-led overthrow of Amin, the Ugandan Army has been responsible for more killings of civilians than any of the burgeoning guerrilla groups seeking to overthrow the government.

The Tanzanian troops have been providing security in much of the countryside. Their departure is expected to lead to an increase in antigovernment guerrilla activity, which has escalated since President Milton Obote won diputed elections last December.

In the last two months, hundreds of people, many civilians, have been killed by guerrillas or the Army in a new round of violence. The bodies have often been left in a forest outside Kampala -- a favorite dumping ground of Amin's killer groups.

It is estimated that 500,000 people were killed during Amin's eight-year rule. Analysts fear a resumption of carnage on a similar scale unless Obote can overcome the tribally based hatred that plagues the country.

Five separate guerrilla groups have been operating in the country, but a guerrilla spokesman said Sunday that they "have decided to merge into one army with one unified military command," called the National Resistance Council.

The first of the departing Tanzanian troops left by boat across Lake Victoria and arrived in Mwanza last weekend. No numbers were given, but it is believed they will depart at a rate of about 1,000 a week.

The low-key welcome the Tanzanian troops received in Mwanza received was in sharp contrast to the euphoria that swept Tanzania and Uganda two years ago when a 40,000-man Tanzanian force, joined by thousands of Ugandan exiles, overthrew Amin.

Since then, Tanzanian President Julius Nyerere has experienced nothing but trouble from his Ugandan venture, which started as retaliation for an invasion by Amin's forces. Nyerere recently told reporters that somebody had to invade Uganda to rid the country of Amin and "we were the chosen victims."

Nyerere has smarted at African criticism of his violation of the Ugandan border and has said he resented the continuing occupation being equated with the Soviet invasion of Afghanistan.

The war is estimated to have cost Tanzania $500 million, including about $5 million a month to keep its troops in Uganda, and he Obote government has failed to pay for the troops' upkeep as promised.

Nyerere apparently decided that his country, strapped by massive economic problems, could no longer afford the expense. He turned down a last-minute plea by Ugandan Vice President Paulo Muwanga to keep a troop presence in the country.

Tanzania's economic problems, caused by the war, drought, mismanagement and increased oil prices, are so severe that the government has canceled plans for elaborate celebrations later this year of the 20th anniversary of the country's independence from Britain.

Last October the Tanzanian Army restored order in remote West Nile Province in the worst disorders since Amin's overthrow.

The Ugandan Army fled in the face of an invasion of guerrillas formerly loyal to Amin, then came back with Tanzanian support. The victorious Ugandans burned and looted as they advanced and it is estimated that more than 1,000 persons, mainly civilians, were killed.

Most of the disurbances around Kampala during the last two months have been carried out by two anti-Obote groups. One, the Uganda Freedom Movement, is made up mainly of Bagandas, the largest tribe and long enemies of Obote.

Attacks lately have been carried out by the People's Revolutionary Army, led by Yoweri Museveni, defense minister in the previous government led by Muwanga. Museveni's group has attacked police and militaryh installations and ambushed Tanzanian Army vehicles. Military retaliation often has been harsh.