Liberia, black Africa's oldest republic, is undergoing the wrenching change of a political liberalization that promises to challenge the power of the ruling elite of his country for the first time in more than a century.

Ten months ago the clubby True Whig Party, which has ruled Liberia uncontested since 1878, was jolted by violent riots against government-proposed rice price increases in which 40 persons were killed.

Since then, the party, under President William R. Tolbert, has taken a close look at itself and begun moves to broaden its base and create a more democratic society.

But these tentative steps by the party leadership are seen as too little by a militant faction in the party and by opposition groups who, for the first time, are managing to gain legal status as political parties.

Two leftist parties are at work organizing urban workers and rural peasants in an effort to transform Liberia, traditionally one of the United States' closest allies in black Africa, into a socialist state.

While the True Whig Party clearly has no intention of going that far in its reforms, a high official achnowledged this week that the government "recognizes the fact that changes are overdue."

While the ferment in Liberia parallels recent developments in several other West African states, the clamor for a broader franchise in this country is complicated by the dominant position of the land-owning black "settler" population, some 45,000 descendants of former slaves who were repatriated here from the United States in the early 19th century and founded the Liberian republic.

The young militants are challenging the old guard's grip on the True Whig Party, which takes its name from the American party that has its heyday in the pre-civil war period. The two avowedly leftists groups outside the party are pushing for a change in the way Liberia has been run for generations.

At the center of the tumult is Tolbert, 66, Liberia's president since 1971. For 19 years Tolbert lived in quite obscurity as vice president under the tough rule of the country's late president William V. S. Tubman.

Both critics and supporters say that, ironically, it is Tolbert's tolerance of dissent, which Tubman never permitted, and his relaxation of controls on the press that have created a growing demand for still greater reform.

Two other Tolbert policies -- bringing large numbers of Liberia's aboriginal Africans into the government and an emphasis on economic development -- have nurtured this demand.

Since its independence in 1847, Liberia, a tropical country the size of Pennsylvania, has been controlled by the "settlers" also called Americo-Liberians, who make up less than 3 percent of the present population of 1.7 million.

In recent years, however, the settlers have absorbed some of the area's native population and together this ruling elite, closely identified with the True Whig Party, froms a distinct power-wielding class. They are recognizable by their Western names, adherence to Christianity and membership in the Masonic Lodge, long a Liberian power center but now on the wane.

The incident that jarred the True Whigs and acted as a catalyst for opposition groups was the "rice riot" in Monrovia last April that resulted in the deaths of some 40 people with 600 others injured and property damage estimated at $60 million.

The riot erupted when poorly prepared police and soliders opened fire on demonstrators protesting a government proposal to increase the price of rice, the staple food of Liberians, 36 percent, from $22 for a 100-pound bag to $30. The average Liberian worker earns $80 a month.

The proposal was dropped and the price was reduced to $20 per hundred pounds. But the attitudes of the militants, who supported the demonstration, and the conservatives, who called for a return to Tubman's no-nonsense controls have hardened.

In an effort to address the new challenges, the True Whig Party appointed a task force, including members of its reform wing, to take a close look at the party. The report it produced was a scathing one.

"It seemed as if a wave of disenchantment and an air of disillusionment had engulfed the people," the report said, "due mainly to deficiencies and malpractices of the party, which they did not hestiate to articulate."

"It was just a social club," one reform-minded member and government official who declined to be identified said of the True Whig Party. "There has been no open primaries and the partisans who were selected to join the Freemasons selected the office-holders at caucuses at the Masonic temple.

"Membership in the Freemasons was for those who were 'safe' whether you were 'country people' (indigenous) or settler," he said.

Today, few members of the True Whig's reform wing are members of the Masons, but they exert increasing influence on party policy.

An opposition party, the Progressive People's Party, managed to register in December after a long court battle.

Its chairman, Gabriel Baccus Matthews, who was jailed after organizing the rice protest, espouses a brand of African socialism that Liberia's conservative politicians find particularly threatening.

Matthews claims his party is harassed by officials in its organizing efforts among Monrovia's poor and the country's rural peasants. Liberian Information Minister Johnny A. McClain denied the charges.

In Matthews' grimy party headquarters in the heart of Monrovia's downtown slums, several party members who said they had recently been released from prison were bragging about scars on their backs and buttocks that they said were from floggings they received while jailed.

Another group challenging the status quo in Liberia is the leftist Movement for Justice in Africa, commonly referred to as Moja, headed by Togba-nah Tipoteh. Tipoteh was fired as a economics professor at the University of Liberia after he began his political activism. p

Moja spokesman Dew Tuan-Wleh Mayson, interviewed in the movement's spartan headquarters in a hilly back alley, rejected characterizations of his organization as Marxist-Leninist.

"We have members who have studied it, but we have not taken any labels," he said.

Moja and the Progressive People's Party do not cooperate, because of personality differences between their leaders and competing interests.

But Mayson also complained about government harassment and attempts at intimidation, particularly in Grand Gedeh county, where Moja has a rural cooperative development project.

"Government officials have their farms in these areas," said Mayson, "and soon the peasants will understand that they are not getting a fair return for their labor. That is why [the officials] want us out of there," he added.

A potential political confrontation was averted last fall when a University of Liberia professor, Amos Sawyer, announced as an independent candidate for mayor of Monrovia against the True Whig Party candidate, Francis Horton.

True Whig hardliners, apparently fearful that Sawyer would garner widespread support among discontented slum dwellers, cited a long-ignored constitutional requirement that voters had to be property owners.

As controversy grew heated over the issue, Tolbert postponed the election until this June and in January he asked the True Whig-controlled legislature to amend the constitution to allow all Liberians to vote.

One Western observer said he did not think the amendment will pass. The True Whig Party "would be cutting its own throat if they broaden the franchise," he said.

Information Minister McClain, acknowledging that the government "recognizes the fact that changes are overdue," insisted that "there is an effort and willingness to change." But, he added, "it has to be done with stability."