President Kenneth Kaunda, who for 16 years has ruled Zambia with a generally soft hand, suddenly faces growing opposition as a result of economic decline and political malaise within his ruling party.

As a number of African nations begin to wrestle with the problem of replacing the first generation of leaders who brought their countries to independence, Zambians are increasingly wondering how much longer "K.K.," as they fondly refer to him, will remainin power.

Nobody is predicting Kaunda's imminent overthrow, particularly since the military appears to be loyal. Even his critics speak with trepidation about the possibility of his departure, acknowledging that chaos and instability would be the most likely result with no apparent replacement in sight.

Nevertheless, the subject is increasingly the topic of conversation in Lusaka, the capital, especially since Kaunda disclosed what he said was a right-wing coup plot in mid-October.

Much of Kaunda's problems are linked to the poor economy. People sometimes line up for hours for scare consumer items such as corn, the staple of the diet, as well as cooking oil, soap and milk.

Kaunda has been one of the key figures in the fight for black rule on the continent and was preoccupied for more than a decade with liberation wars on his borders. Although officially socialist, nonaligned and strongly critical of Western nations for hesitance to confront white-minority rule, Zambia has strong ties with the West. It has received more than $100 million in American assistance in the last three years, second only to Sudan in sub-Saharan Africa.

But Kaunda has turned more to the East Bloc in recent years after failing to gain Western military support. His purchase of Soviet fighterbombers last year led to a $7 million cut in U.S. aid.

Kaunda also has political problems, primarily linked to a controversial bill, which limits candidacy and voting in provincial elections to members of the country's only party, the United National Independence Party. Only about 8 percent of Zambia's 5.5 million population belong to the party. There are frequent charges of corruption in the party.

For a brief period Kaunda skillfully used the alleged coup to rally support around him. Now, six weeks later, little more information has come out, and Kaunda, having put himself in the middle of the issue, is threatened with a serious loss of credibility.

"The last coup failed, but there will be further attempts," said one disgruntled Zambian never known for disloyalty in the past.

"I would like to see him continue to rule, but he must see that fundamental change is required" in the economy and the one-party state, a prominent industrialist said. He had little confidence that the president would take such action.

Critics avoid attacking Kaunda in person but instead blast his advisers, particularly those in the party's 24-member Central Committee.

Former home affairs minister Aaron Milner, who has come under sharp attack from the president said, "Unfortunately, Kaunda has some rogues around him."

Sooner or later, he added, a leader has to take responsibility for his aides.Milner predicted that unless there is a change, Kaunda is likely to receive less than the required majority vote in the next presidential election scheduled for 1983 even though by law he would be the only candidate.

Meanwhile, six weeks after Kaunda's announcement of the plot, a dusk-to-dawn curfew remains in effect with Zambians increasingly wondering why.

At the time Kaunda said a number of prominent Zambians were involved, and four leading Zambians were arrested shortly after Kaunda's announcement.

Two have been released while the other two are being held under special presidential detention orders on grounds that they met sometime between March and October to discuss the violent overthrow of the government.

One of the men detained, former central bank governor Valentine Musakanya, won an application for release on the basis that the grounds for the arrest were too vague.

Before he could be released, however, police rearrested him without giving any grounds.

The party newspaper, the Times of Zambia, called the police action "high-handed and unscrupulous" providing "worrying signs of a police state."

Edward Shamwana, the other key detainee who is a prominent lawyer and Kaunda's former golfing partner, lost his appeal challenging the legality of the presidential detention order. The judge ruled it was valid on the basis that the country had actually been under emergency rule since 1965, although most Zambians certainly did not realize it.

Most criticism of the government has centered around Grey Zulu, who is in charge of defense and security and ranked number four in the ruling hierarchy, and Home Affairs Minister Wilted Phiri, who was just appointed the president's key political adviser in a government reshuffle Kaunda announced at the press conference.

At his press conference, Kaunda showed his well-known temper when questioned about Milner and other critics.

"I'm sick and tired of these stupid statements being made by people who failed this nation," he said, with anger in his voice. Milner, the president said, "should not tempt us. We are running a civilized society" where "nobody disappears."

"His misbehavior," Kaunda added, "is such that if he were elsewhere he'd be locked up indefinitely."

The sharpest public criticism of the government was made last week by Francis Nkhoma, a member of parliament and general manager of Barclays Bank in Zambia.

Speaking in parliament where he has legal immunity, he said, "What we have now is a leadership interested in entrenching a rotten dictatorship which has lost touch with reality. . . . They have lost the support of the people and are being protected by the police."

Nkhoma was particularly critical of the decentralization that the party implemented without first gaining parliamentary approval.

"Some of us [in parliament] are getting apprehensive over the high-handed fashion in which the party is carrying on business," he said.

Former agriculture minister Alexander Chikwanda said, "unless 'K.K.' comes back to the center he will hurt the country. People in the Central Committee want to push him to the left but Zambians don't want anything smacking of communism."

Kaunda strongly defended his record in his press conference.

"We have been running this government efficiently, very efficiently," he said.

As he continued, however, he wavered, saying, "By comparison [with other countries] we have done extremely well."

And then he came to the bottom line saying, "At least we have not collapsed."

Some of his critics would simply add one word -- yet.