Yoweri Museveni, the guerrilla leader who proclaimed himself president of Uganda yesterday, acknowledged to western diplomats early this week that his National Resistance Army had received arms and other assistance from Muammar Qaddafi's Libya.

Museveni, however, said he sought Libya's help only because he was "compelled by circumstances," adding that he was not a "tool of Qaddafi," a senior western diplomat said.

The Associated Press reported yesterday from Tripoli, the Libyan capital, that Qaddafi sent the new Ugandan leader a message of congratulations. Libya's state-run television reportedly broadcast four film clips showing Museveni meeting with Qaddafi in the Bedouin tent in Tripoli where the Libyan leader meets important guests.

In one of the tapes, Qaddafi asked Museveni, "What arms can we send you? Can we send you tanks?" Museveni said in response that he needed all the arms he could get.

Libyan television described Museveni's victory over the military government of Uganda as "a great triumph of the Libyan people and of all popular revolutionary forces throughout the world."

Museveni's rebels spent nearly five years in the bush of southwestern Uganda waging a guerrilla war against the government of former president Milton Obote. Last July, when Obote was overthrown by a group of northern Ugandan generals, Museveni continued to fight. His forces now control about two-thirds of the country, with soldiers of the ousted government having fled to their homes in the north.

In his meeting Sunday with western diplomats, Museveni went out of his way to distance himself and his movement from Qaddafi. "How can you say I am under this man's [Qaddafi's] sway?" one diplomat quoted Museveni as saying. "I fought against him in 1979."

Museveni helped lead the Tanzanian invasion of Uganda in 1979 against the Qaddafi-supported government of Idi Amin. In an attempt to repel the invasion, Qaddafi had dispatched 1,500 Libyan troops to Uganda. The Libyans, however, were forced to flee after several embarrassing defeats. Amin escaped to Libya.

In recent years, Qaddafi also has sent troops into Chad and has been implicated in air raids against Sudan and in mining Egypt's Red Sea coast.

In other developments involving Uganda's five-day-old government, Museveni today named Samson Kisekka, a 73-year-old physician, to be his prime minister.

Kisekka, who had been the chief spokesman for the National Resistance Army, has long been a key adviser to Museveni. Museveni named Pontiano Mulema, a former member of Parliament, as finance minister.

Mulema, who has a master's degree in business administration from Columbia University, is considered by political observers in Kampala, Uganda's capital, to advocate a free-market approach to the country's economic problems.

The ousted leader of Uganda's military government was reported today to have flown to neighboring Sudan. The Sudanese news agency said that deposed head of state Gen. Tito Okello, along with several of his ministers, flew by helicopter to the town of Juba in southern Sudan yesterday. The agency said Okello had not asked to stay but was reorganizing his forces and intended to return to Uganda.

Museveni asked soldiers of the deposed government yesterday to surrender, promising that they would not be harmed. Reports from Kampala today indicated that nearly 3,000 soldiers turned themselves in at the central police station. Several thousand government soldiers are still at large, most of them in northern Uganda.