A curtain of fear and gloom has dropped over Kenya's intellectual community following the detention of one of East Africa's foremost writers and one of the continent's most respected intellectuals, Ngugi Wa Thiong'o.

The novelist was picked up by the police at his home early on the morning of Dec. 31. That was the last his wife and five children have seen of him.

The official Kenya Gazette has announced that Ngugi was being detained under the country's public security regulations. The detention of Ngugi, chairman of the University of Nairobi's literature department and who formerly taught at Northwestern University in Illinois, has raised doubts that legitimate forms of protest and dissent will continue to be tolerated in Kenya.

The regulations under which Ngugi was arrested are similar to laws enacted by almost every African country. It permits the state to detain a person indefinitely without charge or possibility of appeal if his views do not coincide with those of the government.

The general feeling in Nairobi is that Ngugi's play, "Ngahlika Ndenda," posed a threat to the status quo. After a standing-room-only run of about a month, the play was banned by the local government administrator.

Ngugi, who rejects the label of Marxist, has become increasingly critical of Kenya's capitalist economic system and he frequently uses ideological terms such as neo-colonialism, exploitation and imperialism.

His recent best-selling novel, "Petals of Blood," has been generally acclaimed as the best existing critical analysis of Kenya's post-independence socio-economic system. University of Nairobi political scientist Michael Chege, writing in Nairobi's African Perspectives magazine, describes the system as a capitalist economy marked by "dominance of international capital, cumulative income inequalities, export-oriented agriculture, unemployment, and a state-dependent and parasitic capitalist class."

But the play, staged in a village about 25 miles from Nairobi with a cast of local peasant farmers and a script in the vernacular Kikuyu language, is considered far more dangerous than the London-published novel which has not been banned.

The play dwelled on how the former Home Guards who were loyal to the British administration during the Mau Mau rebellion are now collaborating with foreign capitalists and getting rich, while those who struggled against colonialism are still barefoot.

One well-placed Kenyan said Ngugi was detained because "he began to take his ideas to the people and this was considered a threat to law and order. The people knew very well what he meant. He was talking in their language."

When Ngugi was detained, some of his colleagues, some more radical than he, dropped out of sight, fearing they might be targeted for arrest. Some had previously been detained by the police for questioning.

One normarlly talkative and confident young university lecturer said, "Psychologically. I'm not prepared to discuss Ngugi, literature or the arts now. I don't think you'll find anyone who feels relaxed enough to talk."

Even the university's once activist student body is afraid. A strike was called but failed to materialize, although African students and faculty from Nigeria to Tanzania are protesting Ngugi's detention.

Kenya's students have lost virtually every channel of free expression. Their newspaper, the University Platform, was banned in 1973 and one of its former editors, Chelagat Mutai, a student radical later elected to parliament, is now in jail for inciting some of the rural constitutents to riot.

Kenya's most unrestrained critical politician, J.M. Kariuki, was murdered three years ago and since then three other members of parliament have been detained under the same law as Ngugi. Several other politicians and trade union leaders are also detained in undisclosed parts of the country.

Kenya's trade union movement, once among the most dynamic in Africa, is now powerless. One trade unionist accused of leading an illegal strike said, "Kenya's trade union movement is practically useless. We can't strike . . . and if you really speak your mind they find a flimsy excuse to lock you up."

Without a doubt Kenya still has the liveliest parliament in Africa and the continent's freest press, but journalists who are openly critical are harassed and questioned by the police.

One of the country's most respected reporters was Philip Ochieng, who most recently worked for Target, a Christian newspaper.But after Ochieng criticized Kenya's jubilation at Israel's successful Entebbe raid, the attorney general, Charles Njonjo, ordered him removed from his job. Ochieng now works in neighboring Tanzania.