KAMPALA, Uganda (AP) _ A gunman suspected of having ties to an insurgent rebel group hijacked a Uganda Airlines domestic flight Sunday with 49 people aboard and forced it to fly to rebel-controlled territory, officials said.

Four West Germans were among the passengers and crew aboard the Fokker Friendship, said Guenter Held, West German ambassador to Uganda. He identified the four as medical personnel working in northwestern Uganda and said he had no other details on the hijacking.

The twin-engine, propeller-driven plane was on a scheduled one-hour flight from Entebbe International Airport near Kampala to Arua, in northwestern Uganda near the Zaire border, when it was hijacked, Ugandan officials said.

Ten hours after the hijacking, a man purporting to be a spokesman for the National Resistance Army in Uganda called the Nairobi bureau of the British Broadcasting Corp. to claim responsibility for the hijacking.

The caller said the plane was diverted to Kasese in southwestern Uganda, 200 miles from Kampala, because the military government had been using that flight to bring troops to Kampala. The caller said the crew and non-military people would be released unharmed but did not say what would happen to military men who might be aboard.

There was no official announcement of the hijacking on government-run Radio Uganda. But government officials suspect the rebel group.

''I don't have any idea, just speculation,'' Paul Ssemogerere, Uganda's internal affairs minister, told reporters Sunday night in Nairobi when asked about possible rebel involvement. ''One cannot rule out that theory. Obviously it is a very strong suspicion that it is the NRA.''

The National Resistance Army is the largest of four insurgent groups that fought separate bush wars against former civilian President Milton Obote. Since Obote was overthrown last July, three of the groups have observed a cease-fire with the new military government.

The rebel group has instead stepped up its campaign, taking control of large areas of the countryside.

Ssemogerere is in the Kenyan capital to lead the government side in peace talks with the NRA.

Rebel spokesmen said the government cut their telephone link to other rebels and they had no way of confirming if the NRA was responsible.

An unconfirmed report from Kampala said the hijacker might be an escaped military prisoner who commandeered the plane to join the rebels.

The man was only identified as Lt. Mugisa, a member of the former Uganda National Army, a group of soldiers of ousted dictator Idi Amin. The report was attributed to an unidentified member of that group.

A half-hour after the flight took off, the pilot radioed the control tower at Entebbe that a gunman was making him fly west, Ssemogerere said. There was no subsequent transmission and no indication if the gunman had accomplices.

Arua is 350 miles northwest of Kamapala and a stronghold of many former Amin soldiers. The military government that took power July 27 has recruited former Amin soldiers to help fight rebels.

Government officials in Kampala, who stipulated anonymity, said two members of the ruling Military Council were supposed to have taken the flight and might have been targets of the hijacking. There was no explanation why the military men, Isaac Lumago and Amin Onzi, missed the flight.

Both men are major generals and were commanders in Amin's army.

The hijacking occurred as the government and the NRA were nearing the conclusion of a fourth round of peace talks in neighboring Kenya.

President Daniel arap Moi of Kenya has hosted the Nairobi talks.

The Entebbe airport where the flight originated is the country's main air terminal and is about 24 miles south of Kampala on Lake Victoria.

About half a mile from the new Entebbe airport is the old terminal that was the scene of the 1976 Israeli raid to rescue hijack victims of an Air France jetliner that had been taken over after leaving Tel Aviv.