Karel Prinsloo, Associated Press
A young Kenyan boy collects grain that fell off a World Food Program truck Saturday at the Nairobi showgrounds where people took shelter from ethnic fighting.

NAIROBI, Kenya — Three days of attacks and counterattacks among rival tribal gangs have killed at least 27 people in the previously calm city of Nakuru in western Kenya, prompting the deployment of the Kenyan army for the first time since the disputed presidential election last month unraveled this East African nation.

People have been hacked with machetes, shot with poison arrows, stoned, bludgeoned and burned to death in street fighting mostly in the poorest neighborhoods of the city, said residents, local media and aid groups Saturday.

Gangs of young men from President Mwai Kibaki's Kikuyu tribe are battling Kalenjins and Luos loyal to opposition leader Raila Odinga, who has accused Kibaki of stealing the Dec. 27 election.

Over the past several weeks, Kikuyu homes across the western Rift Valley province have been torched by Kalenjin gangs in violence triggered by the election. Kikuyus have fled their homes and farms by the hundreds of thousands, with large numbers winding up in camps around the provincial capital of Nakuru, a city of two-story buildings, a few hotels and middle-class neighborhoods.

Kikuyu gangs appear to have attacked in revenge in recent days, touching off street battles that had calmed down by Saturday evening.

Long-standing tensions over land rights have erupted before in the volatile west, where areas traditionally considered to be Kalenjin have been settled over the past 50 years by Kikuyus, often with the assistance of a Kikuyu-dominated government. And across much of Kenya, there has been a simmering resentment of Kikuyus, who have dominated politics and business for decades.

By nightfall Saturday, police helicopters were buzzing over Nakuru, and Kenyan soldiers were patrolling the streets. The downtown business district was closed, with only one supermarket open, said Stella Karanja, who runs a school that shut down early Friday because of the fighting.

"It's quiet, but there are tensions, and nobody is on the streets," she said. "People have not been sleeping. Men have been going out and patrolling at night."

Karanja said that in her diverse, middle-class enclave, Kikuyus, Kalenjins and others have been on the phone constantly with one another and coming together "regardless of tribe."

The fighting came as former U.N. Secretary General Kofi Annan, who is in Kenya to mediate between Kibaki and Odinga, headed to the Rift Valley to tour burned-down villages, torched churches and other areas hit hardest by the violence.

On Saturday, Annan said that "gross and systemic" human rights abuses had occurred in the area.

"Let us not kid ourselves and think that this is an electoral problem," Annan said, according to the Reuters news agency. "It is much broader and much deeper."

Opposition leaders have called Annan's mediation effort the last chance for Kenyans to resolve the political crisis, which has left at least 700 people dead and displaced more than 200,000.