This is how Anthony V. Church, master of Keepers, a horse farm in this bucolic suburb of Nairobi, gets ready for bed.

First, he steps outdoors to look in on the night watchman, making sure the man has his whistle, his horn, his shield, his bow and arrow, his rungu (a wooden staff designed to knock heads) and that he is awake. He then returns to his house, draws the curtains, switches on the exterior security spotlights and locks all the windows and doors, including two hallway doors separating his bedroom from the front door.

In his bedroom, he checks the battery level on his bedside short-wave radio which he uses to communicate with a vigilante syndicate of 10 neighbors, all of whom have vowed, when a coded alarm is broadcast, to come running day or night with their guns loaded.

Finally, he removes his double-barreled 12-guage shotgun from his gun safe, loads it and leans it against the wall beside his bed, just under the silent-alarm button that, when pressed, dispatches a truckload of rungu-swinging private guards to Keepers within five minutes. Leaning against the wall beside the shotgun is a steel-tipped Masai spear.

Still, Church, who last year emptied his shotgun into two knife-wielding robbers as they burst into his bedroom, complains he is not sleeping soundly these days. And he is not alone.

One of Nairobi's periodic waves of gang robberies has crested here in Karen in recent months. Breakins by gangs of up to 30 young men, armed with pangas (a kind of machete), axes, crow bars and large stones, have become an almost nightly event. Typically, doors are battered open with stones in the middle of the night, a few gang members rush to the bedrooms and hold pangas to the throats of homeowners in night attire while their associates flee with stereo and video equipment.

In the past two weeks, these robberies have been tainted by what longtime Karen residents say is an unprecedented level of violence. On May 24, an 82-year-old man and his daughter were severely beaten by thieves in search of guns. Finley McNaughton remains in a Nairobi hospital with two broken arms.

Nine nights later, a British architect, his wife and a security guard were shot and killed by a gang member with a high-powered rifle. A total of five people, including two robbers, have been killed in Karen in the past three months.

Gang robberies and suburban gunplay last week pushed Kenya's President Daniel arap Moi to order police to "bring this undesirable situation to an end." Police in Karen have beefed up patrols, a private security company here has ordered bullet-proof vests for its guards and Karen residents say that now, as never before, they fear the coming of night.

"It has gotten to such a pitch that it is very difficult to relax and sleep," says Church, 46, owner of a safari tour company in Nairobi. His house has been attacked five times by panga gangs since 1982. "Every time there is a squeak in the house, one pops awake and reaches for the shotgun."

This horsey suburb of well-trimmed hedges, well-oiled English saddles and well-heeled expatriates, white Kenyans and black Kenyan government officials draws its name from the Danish Baroness Karen von Blixen. She lived here a half century ago and, under the pen name Isak Dinesen, painted idyllic word pictures of what then was a 6,000-acre highland coffee farm in the shadow of the Ngong Hills about 12 miles outside Nairobi.

"Up in this high air you breathed easily, drawing in a vital assurance and lightness of heart," the baroness wrote in her famous book, "Out of Africa." "In the highlands you woke up in the morning and thought: Here I am, where I ought to be."

That, of course, was before the panga gangs. One 60-year-old woman who has been "done" by the gangs twice in the past 10 days, and who refuses to allow her name to be published for fear of a third revenge attack, says she now wakes up in the morning in her Karen home exhausted from a long night's fretting.

"About an hour after dark, I am so afraid I can hardly swallow my food," says the woman, a British expatriate horse breeder who, with her husband, has lived for 26 years in East Africa. "I've got two guards, five dogs, a silent-alarm securty button, sirens and flashing lights on the roof, but after a couple hours at night in this house, I get this panicky feeling I've got to get out."

Latter-day devotees of Isak Dinesen -- whose book "Out of Africa" was just filmed here -- have had to make their own adjustments to Karen's crime problem. For the film, a big-budget Universal Pictures production directed by Sydney Pollack and starring Meryl Streep and Robert Redford, security was extremely tight. The set was ringed with security patrols. A 5,000-volt electric fence was built around Anthony Church's farm, which boarded 160 horses and oxen used in the film.

The affluence and topography of Karen, with its rolling hills and sprawling estates, makes it a particularly attractive target for robbers. Panga gangs can strike and evaporate into the Ngong Forest and several other nearby wooded areas. One group of thieves, known locally as the "Six-Minute Gang," has perfected a breakin technique that has them in and out of a Karen house in the six minutes that it takes for radio-dispatched security forces to arrive.

Highly publicized, tightly orchestrated villainy in this famed, mostly white suburb, however, is only part of what police, private security specialists and criminologists here acknowledge is a 20-year-old and steadily growing crime problem in Nairobi. They say the crime rate in black and Asian neighborhoods of the city, while less celebrated than in Karen, is considerably higher.

"As time goes on, this kind of crime gets worse and worse throughout Nairobi," says Erasto Muga, a criminologist at the Universiy of Nairobi who has studied criminal behavior in Kenya for 17 years. "It gets worse because the disparity of income between people in this city continues to grow wider."

Nairobi, with 1.2 million people and a growth rate that will double its population in less than 10 years, is primarily a city of men. Men, most of them under 30 years of age, make up about 60 percent of the city's population.

"They come here from the countryside after dropping out of high school and primary school, hoping to get employment, but they are badly disappointed," says Muga, author of "Crime and Delinquency in Kenya."

"They soon find that they have nothing and yet all around them there are so many attractive things that they would like to have.

"These people who have nothing survey the suburbs for days -- they have nothing else to do. The ones who are not sophisticated learn from the sophisticated ones. They join gangs and they figure out ways of getting what they want."

Muga says that the anonymity of Nairobi, which he says is like many large cities in sub-Saharan Africa, encourages young men to ignore the values they grew up with back in their home villages.

"In Africa a man's way of life is very much controlled by the attitudes and values of his extended family. Everyone knows everyone else in rural Africa and is very much afraid of doing something that will reveal him to be a bad person. Anonymity here allows young men to commit crimes they would never consider if they were back home," Muga says.

Only about 10 percent of Kenya's 17 million people live in cities, Muga points out, yet cities are home to more than half the country's crime.

In the past decade, fear of crime has changed the face of Nairobi's suburbs, which long have been the premier residential drawing cards in all of black Africa for white expatriates. These suburbs, blessed by the endless spring climate of highland Kenya, still offer low-cost neocolonial splendor, complete with gardens, lawns and a complement of domestic servants -- all at a cost competitve with rent on a one-bedroom apartment in Dupont Circle.

But now, amid the flame trees, the bougainvillea and the passion flowers, there is a panoply of defensive hardware. There are high stone walls imbedded across the top with shards of broken glass, day and night security guards with helmets and shields, massive spear-topped iron gates, barbed wire and electrified fences that -- when tampered with -- set off alarms and flashing lights. On nearly all upscale suburban windows there are burglar bars.

For suburbanites unwilling or unable to use guns (extremely tight gun-control laws in Kenya keep guns out of the hands of most crooks and most victims), there are crossbows, slingshots, baseball and cricket bats, mace guns, hockey sticks and sword sticks -- walking canes which conceal a steel sword.

Most importantly, there are dogs, thousands of them, large, growling and bark-prone. Many suburban homes have two or three of these suspicious dogs: German shepherds, Rhodesian Ridgebacks and Golden Retrievers. Karen, along with nearly all the suburbs of Nairobi resound all night to the nervous barking of these dogs.

There are five booming security companies in Nairobi that offer silent-alarm buttons (usually installed in the master bedroom above the bed) which call in club-carrying guards who are staked out 24 hours a day in radio dispatched vehicles parked throughout the suburbs.

George Sebaris, owner of Ultimate Security, a company with 1,500 silent-alarm subscribers, many of whom live in Karen, says his firm is swamped and can only put new customers on a waiting list. "We cannot import enough electronic equipment to keep pace with demand," he says.