Several hundred orderly Nandi farmers stood for hours today in the Kenyan highlands' morning chill before filing, one by one, into the school to cast their ballots in a national election that President Daniel arap Moi expects will finally release him from the lingering presence of the late Jomo Kenyatta.

Since he came to power in 1978, Moi has weathered a reported assassination plot, a bloody Air Force coup attempt, a sharp drop in Kenya's economy and, by his own recent account, the recognition of "evil-minded people" in his government who are holdovers from Kenyatta's days in power.

By calling parliamentary elections a year in advance "in order to clean the system," Moi has indicated to Kenya's 7.2 million registered voters that it would serve their local interests to elect members of Parliament closely identified with him and to reject any incumbents who are likely to be "disloyal."

The first set of election returns were expected to be released late tonight, but final results were not expected until at least Tuesday afternoon. Without exception, Kenyan voters in every election during the two decades of independence have turned out 50 percent of parliamentary incumbents.

Kenya is a one-party state, and all 760 contestants vying for 153 parliamentary seats are members of the Kenyan African National Union. Moi, his hand-picked vice president Mwai Kibaki and three other members of Parliament ran unopposed.

Several of the Nandi residents at this small town 180 miles northwest of the capital of Nairobi said they were voting for the favored incumbent here, Transportation and Communications Minister Henry Kosgey. They favored him, they said, because he has provided development money for their area, a sign that he is liked by Moi.

Voters at Koilot, who are strong Moi supporters, said Kosgey also is one of several members of the president's Cabinet who is intensely loyal to Moi.

"We want to elect a person who's close to the president, who'll work with the president and thereby keep development projects coming here," said William arap Agui. "We don't want the money to dry up because our MP is not liked by the president."

While a number of voters at Koilot understood what President Moi wants, it was not clear today during the relatively peaceful voting throughout Kenya if Moi loyalists would keep their seats or if a higher than normal 50 percent of disloyal incumbents would be voted out. Moi is thought to have a genuine popular base in the country.

For a decade and a half before becoming head of state, Moi was Kenya's unobtrusive vice president, who quietly labored in the shadow of Kenyatta, Kenya's first president. Moi automatically became head of the government for 90 days when Kenyatta died in 1978.

For years before, Kenyatta had given up the day-to-day running of the government to trusted subordinates, who did not include the vice president. The debonair and widely disliked attorney general Charles Njonjo was at the center of the powerful clique around Kenyatta.

After Kenyatta's death, Njonjo held onto his power and influence when he publicly sided with Moi by leading the faction that stopped an alleged plot to keep Moi from assuming the presidency.

After Moi's election in 1979, Njonjo was seen as playing an influential role in an uneasy three-way alliance with Moi and vice president Kibaki. Njonjo was said to have a powerful role in selecting Moi's first Cabinet, in which a number of the 27 members were reportedly more loyal to Njonjo than to Moi.

Moi repeatedly issued policy directives to Cabinet ministers that were ignored, said a well-informed western diplomatic source. "No one was sure how or who was running the government," the source said.

The abortive Air Force coup on Aug. 1, 1982, began to bring matters to a head. One diplomatic source said Moi was "shocked" to learn that some government officials had advance knowledge of the coup but did not report it to him. This reportedly caused Moi to have misgivings about the loyalty of several of his Cabinet ministers.

After the coup, Moi distanced himself from his Cabinet and required even Njonjo to make an appointment before seeing him in the presidential office. Last spring Moi began a campaign to remove Njonjo by announcing that an unnamed "traitor" to his government was being groomed by a foreign power to take over from him. By July, Njonjo was branded the traitor, suspended from his Cabinet post of constitutional affairs minister and suspended from the party. He is now facing a judicial inquiry into his activities that will probably begin soon after the election.

In announcing the election and in a pointed reference to Njonjo and his supporters, Moi said, "It is absurd that some of the people I have appointed to senior positions have outwardly pretended to be loyal to me and yet behind the scenes, they have been using their positions to promote their selfish ambitions."

In August, Moi announced that his next Cabinet will be governed with discipline and indicated that those with whom he is displeased will not be returning to ministerial offices even if reelected to Parliament.