Algerian President Houari Boumediene appeared to be fighting for his life yesterday as American medical specialists rushed to Algiers to treat a kidney illness that has kept the militant Arab leader secretly hospitalized for nearly two months.

Four U.S. military physicians were flown to Algeria from American bases in West Germany late Sunday night after the United States received an emergency request for help, U.S. officials said yesterday. Two French specialists in kidney disease were also reportedly summoned from Paris.

Boumdiene, who has curved out a role as a spokesman for the Third World on economic and petroleum issues during his 13 years of rule, returned to Algiers last Tuesday from the Soviet Union, where he spent five weeks in a convalescent hospital.

Algerian television referred to Boumediene's health problems for the first time Saturday in announcing that the regularly scheduled Sunday cabinet meeting had been canceled and that Boumediene was under medical supervision. No details were given about the president's illness, which has kept him out of public view for nearly two months.

Reports from Paris said the Algerians has asked French and U.S. specialists in kidney diseases. Reuter news agency quoted reliable sources in Algiers as saying that Boumediene has been receiving treatment on a kidney machine in Mustafa hospital since Saturday.

The signs of danger to the life of the austere, enigmatic Boumediene, whose age and early personal history remain cloaked in mystery, are certain to intesify speculation about his successor and could touch off a power struggle in Algeria.

Until now, according to Middle East Specialists in Washington, potential successors have consciously adopted a "business-as-usual" approach to the power vacuum created by the illness of Boumediene, who seized power in a military coup against former president Ahmed Ben Bella in 1965.

The official Algerian News Agency reported yesterday that Boumediene's "state of health has required increased surveillance" from "highly qualified medical teams of various nationalities." Again, no details were given.

Boumediene's main rival for power in the northwestern African corner known as the Maghreb, King Hassan II of Morocco, discussed the Algerian leader's illness in an interview in Washington last week in terms suggesting that Morocco believes Boumediene's disappearance from the scene is imminent.

Hassan's army has fought the Algerian-backed Polisario guerrillas in the western Sahara territory for nearly two years, and the Moroccan monarch predicted that Boumediene's successor would be less committed to continuing the war.

"President Boumediene's successor will not have the same weight, so the motor that pushes Polisario will be smaller," the king said, adding that alikely struggle for leadership would further weaken Algerian resolve for the war.

This assessment appeared to underpin Hassan's optimism about the eventual outcome of the war, although Morocco's economy is being severely pinched. The United States is declining to sell Morocco new arms to fight the guerrillas, and the Polisario has scored recent military successes that give the guerrillas control of the large portion of the territory's central region.

In listing likely successors, the king mentioned two names also frequently brought up by U.S. experts - Foreign Minister Abdelaziz Bouteflika and Interior Minister Ahmed Benahmed Abdelghani. Both are seen in the West as leaning toward a more moderate foreign policy and some changes in the socialistic system Boumediene oversaw.

Boumediene was also one of the most outspoken Arab advocates for the Palestine Liberation Organization and some of its more radical members. His appearance now could have a major impact on the Palestinians, already disarrayed and demoralized by the Lebanese civil war. Israeli strikes against their bases, and Egypt's movement toward peace with Israel.