They called him the Navajo Huey Long, Navajo Lyndon Johnson, Navajo Richard Nixon and, now that they have ousted him, the Navajo shah.

Peter MacDonald was labeled all of this and more at various times in his rise and fall. Yesterday he left office after 12 years as chairman of America's most populous Indian tribe, overseer of the nation's largest reservation and its billions of dollars in mineral wealth, a post that carries with it the unofficial title, "most powerful Indian in America."

His surprise defeat, despite a hard-fought campaign and preelection visits from two Reagan Cabinet members, has set in motion a profound changing of the guard in Indian country. One measure of the change is the label being affixed to Peterson Zah, 44, a populist sworn in yesterday as tribal chairman: they call him the Navajo Kennedy.

The Navajo election, according to many familiar with it, is at least as significant as the election of a governor or a senator. The Navajo Nation is physically and spiritually a separate country, spanning 25,000 square miles in Arizona, Utah and New Mexico, with a population of 150,000. It is dominated by natural grandeur and human poverty, by ancient rock formations towering over desolate prairies and canyons.

The Navajo tribal chairman also oversees a vast storehouse of natural resources, including the coal that fires the power plants that light up much of the Southwest.

Mining companies pay as little as 2 cents on a dollar for this coal, compared with 12.5 cents on federal land, an arrangement that Zah has vowed to change, even if it means breaking the leases or levying heavy taxes on the energy companies.

The significance of this vow has not been lost on the major energy companies. For weeks, the telephone in the small wooden trailer that housed Zah's transition team was ringing with calls from coal and oil company executives, eager to learn of his plans. But, he said, he refuses to talk to them until he moves down the street to the tribal headquarters at the base of the legendary "window rock," where swirling wind and sand long ago carved a hole in a hulking red stone.

Peter MacDonald is a special case, but he is also a study of a leader who tried to shuttle between a traditional culture and the modern world of power and influence.

Today he is a multimillionaire, fraternizing as readily with oil barons as with medicine men, traveling the reservation in a jet-blue Lincoln Continental, wearing three-piece suits, a target of suspicion among many of his impoverished people, especially the youth.

"Peter became entirely enamored of Continentals and Gucci shoes. It's the old saying: power corrupts," said a Washington lawyer who is a friend of MacDonald. "In a world where you have 46 to 85 percent unemployment, where people take their inspiration from the Great Spirit, Peter just stuck out like a sore thumb. The Navajos have an expression: people tend to wander away."

But the MacDonald who returned to the reservation in the 1960s after a 15-year absence was a different figure from the man who stepped down yesterday at the age of 55.

Then he symbolized the promise of Indian country, a Navajo who had made it in the white man's world and who came home because, he said, he wanted to help deliver his people from poverty and dependence.

He looked to the same rescuers as did many Indians of his time, to their old enemies, the federal government and white entrepreneurs, to develop the Navajos' natural resources and create Navajo jobs in the process. Few of his acquaintances predicted that one day he would be likened to a Nixon or a shah, leaders who became intoxicated with power, grew distant from their people, and paid for it.

Born Hashkasilt Begay, grandson of a powerful medicine man, he changed his name to MacDonald after the song, "Old MacDonald Had a Farm." He says that his teachers told him his heritage was "barbaric."

Then came the Marines and World War II, a degree in engineering and a job with Hughes Aircraft, overseeing multimillion-dollar missile projects in California. In 1966 he was coaxed home to work for then-tribal chairman Raymond Nakai.

"He didn't come home out of charity," an aide to Nakai recalled. "He saw a challenge. That's how we got him."

MacDonald became the first director of the Office of Navajo Economic Opportunity, bringing the Great Society to the reservation: running Head Start programs for toddlers, health services for the elderly and housing programs for those who wanted to leave behind their stone huts, known as hogans.

"I spent six years like that with the grass roots, going hogan to hogan, setting in motion programs that really gave people a sense of moving, a sense of projecting into the future," MacDonald said recently.

But MacDonald benefited, too. He hung his picture in the agency's offices around the reservation, accepting credit for the gifts pouring in from Washington, many Navajos remember. And, tribal officials said, he built a patronage system unrivaled in modern Navajo times.

"He was the Navajo Huey Long," said one longtime aide. "He delivered."

In 1970, MacDonald moved into the post of tribal chairman, a fiery young Navajo railing against "Anglo" oppressors in Washington and the energy industry, vowing to break the "unconscionable" leases that Nakai had concluded with major mining concerns.

Despite his angry rhetoric, MacDonald's ties to Washington and the energy companies grew stronger. Federal programs were born or expanded and the Navajos built roads and sewer lines, housing projects and shopping centers, all with federal dollars that created new jobs for Navajos. Meanwhile, energy companies mined more and more of the ancient Navajo lands, digging for coal, oil and uranium, and hiring hundreds of Navajos.

The tribal government ballooned from an $18 million budget in 1970 to $160 million in 1982. Window Rock, the capital, became a Navajo Washington, cluttered with government offices built with federal funds, dominated by a multimillion-dollar administration building of glass and brick, floodlit at night like a monument.

And at the center of it all was MacDonald, accepting credit for the 30-point drop in Navajo unemployment by 1980. But there was another side to the story that for years did not reach beyond the reservation.

MacDonald was perceived here as sealing himself off from the Navajos, surrounding himself with Anglo advisers, shutting out a new generation of educated young Navajos who watched with disillusionment and nicknamed him the Navajo LBJ, a suitor of the Anglo intelligentsia who snarled nonetheless about Anglo exploiters.

According to officials of the Navajos' justice department, he was a shareholder in a firm that insured many tribal employes. They say he pushed through the tribal council a resolution giving him a lifetime annual pension of $55,000, as contrasted to the Navajos' per capita income of $3,000 a year, and carried his medicine man on the tribal payroll to work in his office, paying him with funds from the U.S. Comprehensive Employment and Training Administration (CETA).

In 1976, scandals rocked the tribal government. Three housing officials were convicted of taking kickbacks through a federal poverty program. MacDonald was indicted in Phoenix on fraud and tax-evasion charges, but the jury deadlocked and a judge acquitted him. Later, MacDonald persuaded the tribal council to pick up his $70,000 legal tab, insisting that the case had been framed by "enemies" of the Navajos, a claim that led to the label: the Navajo Nixon.

"People perceived the accumulation of power in Window Rock and weren't happy," said Claudeen Bates Arthur, the first Navajo woman attorney, who in 1978 became solicitor for the Bureau of Indian Affairs here. In 1981, Arthur received notice from the bureau in Washington that she was to be transferred because MacDonald had "lost confidence" in her. She quit, and soon became Zah's campaign manager.

MacDonald easily was reelected in 1974 and in 1978, despite growing unrest over the corruption charges. It became an article of faith in Indian country that no one would ever defeat him. But then his strategy for moving the Navajos into the modern world went sour.

The recession choked off more and more mining activity, and by last year thousands of Navajo miners had been laid off. Then came the Reagan administration's budget cuts, devastating what remained of the Navajos' economy.

An estimated 10,000 federal jobs evaporated within one year, according to the tribe's director of economic development. With virtually no private sector to absorb the shock, unemployment soared above 80 percent. Foreclosures and repossessions increased, according to a report by the tribal government.

So did alcoholism and child abuse, according to Ron Wood, MacDonald's director of Navajo health programs. There were six reported suicide attempts at one reservation school this year, according to one of MacDonald's aides.

"People are really depressed," said Faith Abeita, 26, an employe of the tribal health services program. "They drink to wipe it out. They have left behind the traditional life, and now they have nothing else. You start to wonder if the federal aid just made the people more dependent, if it killed their spirit."

The idled coal and uranium mines came to be seen as assaults on the natural world, which here is charged with supernatural meaning.

"For the traditional people, it disturbs your sense of harmony to see this earth being stripped away," said Daniel Deschinny, an aide to MacDonald on natural resource issues. "Some of them hold ceremonies to exorcise these black thoughts, but many just silently suffer."

This brought MacDonald another label as the Navajo shah, the leader who embraced rapid energy development, leaving some of his people fearful for their sacred traditions. The cultural consciousness spread to a new generation of young Navajos, who turned their anger on MacDonald. He had not delivered on his promise to break the cheap leases, insisting that the task was more difficult than he had forseen. His critics charged that he had gone soft on exploiters.

"Success always brings a certain amount of envy and jealousy," MacDonald said. "They see me as someone who's closed to the public, who's wealthy, as though there's something obscene about wealth. Is it better for them to be wealthy and their leaders not wealthy?"

Peterson Zah had watched these developments for years as director of Navajo People's Legal Services, traveling the reservation in his 1967 pickup, battling for Indians against energy companies that wanted to develop their land, against white-owned trading posts where he felt Indians were being gouged, and ultimately against Peter MacDonald.

While MacDonald flew across the reservation in his tribal airplane, Zah worked with Indians whose pickups and trailer homes were being repossessed.

The parallels with MacDonald's beginning are striking. Zah, too, was educated in the white man's world in an era of intense distrust toward Washington and the energy industry. But he looks to neither of the old rescuers. Maybe, he said, it was time to go it alone, to talk less of prosperity than of survival as a culture.

"I may not have all the answers, but I will work with you," he said as he campaigned. "I will revere our traditions. I will come to you. And you and I, we will begin again."

Experts on Indian affairs say that they are not sure how this will come about without federal generosity or heavy private investment. Many wonder if Zah will be able to do what MacDonald claimed was too difficult: break the leases and impose taxes on companies that refuse to come to the negotiating table. Zah also pledged to forbid mining in villages where the people oppose it.

At a recent conference of the Indian Rights Association, scholars and Indian leaders wondered aloud: will Zah lead an Indian revolt against the energy industry and the Bureau of Indian Affairs? Will he, unlike those who went before him, manage to reconcile the conflict between opportunity and respecting tradition? Or will he "wander away?"

"After a while in Indian country, you learn things aren't clear-cut," said Deschinny. "There's no black hats and white hats, no cowboys and Indians. Everyone looks the same. Peter MacDonald found that out."