Liberian President William R. Tolbert was assassinated in Monrovia early today in a coup by disgruntled Army enlisted men ostensibly representing the long disenfranchised indigenous population of that country.

Tolbert, 66, one of Liberia's wealthiest businessmen, was shot three times in the head by a band of soldiers who broke into the executive mansion at 1 a.m., according to reports reaching here.

A close friend of the United States, Tolbert ruled a nation established in 1847 by freed American slaves. Today's coup was the first ever in Liberia and followed by almost exactly a year riots in Monrovia, the capital, after government-decreed increases in the price of rice, the West African country's staple food. The increase would have benefited Tolbert personally. c

[A State Department spokesman said the leaders of the coup has expressed the wish to maintain traditional friendly ties with the United States. He said the 5,100 Americans in Liberia were safe but were advised to stay in their homes.]

Today's coup, strikingly similar to a takeover by junior officers in nearby Ghana last June, installed an Army sergeant, Samuel K. Do, 28, in power. Do said over Liberian radio that his soldiers "had no alternative but to overthrow the government."

Do is the leader of a newly formed People's Redemption Council that denounced "rampant corruption" and the "continued failure of [Tolbert's] government to handle effectively the affairs of the Liberian people."

Reports from the Liberian capital said the chief presidential guard, Gen. Charles Railey, was killed with Tolbert and that the dead president's wife, Victoria, was jailed.

By tonight it was unclear just how many people were killed or wounded in the coup, but a number of dead reportedly were taken to Monrovia's main hospital. Sporadic gunfire was heard in the center of the city tonight despite a dusk-to-dawn curfew.

The airport and all border entry points were closed, and the Redemption Council issued orders to immigration officials to arrest any government officials trying to leave.

The council also demanded that the U.S. and Soviet ambassadors come to the executive mansion to meet with Do. Strong ideological leanings on the part of the soldiers were not immediately apparent.

At least one of the aims of the coup became clear, however, when the Redemption Council released about 70 members of the opposition Progressive People's Party from jail and arrested Tolbert's hard-line justice minister, Joseph Chesson. The party's leadership was arrested last month and the party banned after its leader, Gabriel Baccus Matthews, 31, called for a general strike.

Trials on charges of sedition were scheduled to begin on Monday -- the "rice riots" anniversary.

The party had managed to register last December as the sole opposition party after a lengthy court battle. It was one of two leftist movements challenging the century-old dominance of Tolbert's True Whig Party. The True Whigs represent some 45,000 descendants of American ex-slaves -- called Americo-Liberians -- who colonized the country in the 19th century and established Africa's oldest republic in 1847.

Descendants of those settlers, a close-knit oligarchy, have dominated the now 1.6 million aboriginal Liberians.

Only "safe country people," as the aboriginals are called in Liberia, were allowed admission into what amounted to a ruling caste.

The caste system extended to the Army as well, with the rank and file made up of less-educated "country people," officered by Americo-Liberians. Early indications following the coup are that it was these rank-and-file "country people" who toppled Tolbert.

These were the same soldiers who joined the demonstrators during last year's rice riots and left Tolbert "distrustful of his Army," said a Western observer recently. The announced price rise was rescinded following the violence. Three days after the riots, President Sekou Toure of neighboring Guinea flew in 200 of his crack troops unannounced to shore up Tolbert's government, the same source said.

This afternoon Liberian soldiers and civilians looted and ransacked the homes of the arrested justice minister and Tolbert's brother, Frank, who is president of the Senate and who exercised considerable power. Both men are "settler" Liberians.

The Redemption Council issued a call for Finance Minister Ellen Johnson-Sirleaf, who was recently appointed by Tolbert and had previously been one of his harshest critics, to report to the executive mansion.

Sgt. Do announced that the council "will conduct the affairs of government until a decision on future action has been reached."

Tolbert's vice president, Bishop Bennie Warner, had left Liberia for a Methodist meeting in Indiana.

Progressive People's Party members and their supporters were said to have conducted demonstrations in downtown Monrovia during the daylight hours in support of the coup. In a February interview, Progressive Party leader Matthews complained that "things haven't changed here in one hundred years." The people in the country "still live the way their great-grandfathers lived," Matthews said.

Matthews, who espouses a vague form of African socialism, also accused Tolbert's justice minister, Chesson, of threatening, intimidating and torturing his supporters in an effort to crush the party.

Matthews said Tolbert's administration had liberalized the political climate following the death of former president William Tubman in 1971. Many Liberians' expectations had been lifted too high and Tolbert had begun to balk at the opening up the society even more," he said. "But it is too late for him and his party go to back," Matthews said then.

Matthews accused Tolbert of harassing his party's members, an allegation also made by Amnesty International.

Tolbert, who long served under Tubman, unmuzzled the press after his death and announced that he would serve only one elected term -- due to end in 1983. He did bring more indigenous Liberians into his government and, just last month, pushed through the legislature a bill ending the restriction of the vote to property owners.

After the rice riots last year, however, Tolbert became indecisive and was "virtually paralyzed for six months." a Western source said recently. Hard-line "old-guarders" such as Chesson considered him weak and wanted to return to the sterner days of Tubman. A younger, reform-minded wing of his True Whig Party, however, was pressuring him for more political liberalization.

Tolbert wanted to be remembered as the man who had done the most to develop Liberia and -- in his role as this year's chairman of the Organization of African Unity -- as an African conciliator. Last week he had submitted a peace plan to the warring factions in Chad.

Tolbert visited President Carter in Washington in 1979 and 200,000 Liberians greeted Carter in Monrovia during his brief stopover there on a tour in 1978. The capital's population is only about half that number.

A Baptist minister, Tolbert had ruled since 1971. At least 85 percent of the population is illiterate and poor. Shipments of iron ore account for more than half of the annual export earnings of about $500 million.