On the day their leader was sworn in as president of this country, children just taller than their automatic rifles stood near him, smoking cigarettes, glaring at the crowds, and fingering the weapons.

For about 3,000 Ugandan boys under the age of 15, the military victory this year of Yoweri Museveni and his rebel National Resistance Army (NRA) was an act of vengeance against a government whose soldiers had, in many instances, killed their parents.

It also was the culmination of a five-year-old bush war that had transformed many of the children from hungry orphans wandering alone in Uganda's swamps into disciplined fighters.

Before taking Kampala in January, Museveni's commanders reportedly used some of these children as spies to wander into the capital and spot fortifications of government soldiers. According to witnesses, when the rebel shelling of the capital began, NRA children mingled with fleeing crowds, pretended to be lost and threw hand grenades at trucks full of government soldiers.

"In Africa, by the age of four you learn how to fight. This is our tradition," Museveni said in a television interview he gave after taking control of Uganda's government. "So if you are trying to say that it may be disorienting psychologically and so on, this is not the case."

But when the fighting is over -- as in Uganda, where there is the most political stability in 15 years -- what does a nation do with 14-year-olds who have grown accustomed to strutting down the streets of the capital with AK47s?

"These young fellows laugh at a dead body. . . . They are so used to it, dead bodies with nails hammered in the head and so on," said Hans Smeets, a Dutch Catholic priest who has lived in eastern Uganda since 1959. "They have seen their daddy killed, their mommy raped. Tell them to forgive, like Christ on the cross, well, it's not so easy."

"They are terrible. They cannot change," said Dr. Paul Sebuliba, a Ugandan pediatrician who said he is frightened by the transformation of children here into fighters. Sebuliba, who fled into exile after soldiers looted and burned his home five years ago, said the rebel Army children he has talked with "have more revenge in their hearts than I do. At that age, impressions of violence leave strong memories."

Guessing that these child-soldiers would not adapt to ordinary civilian schools -- and in fact might disrupt them -- the Museveni government and the U.N. Children's Fund recently agreed to set up special schools for rebel Army soldiers under the age of 16.

The schools will give six years of training to the children, many of whom have never been in a classroom. The schooling will be designed to teach basic literacy and skills such as welding and carpentry, according to Cole Dodge, UNICEF's representative in Uganda.

There is disagreement, however, between Museveni and UNICEF about whether the children should leave the Army to become students. If the children were to leave the Army, Museveni would lose about one-third of the most experienced and trusted members of his army.

Dodge insists, however, that UNICEF is not in the business of training soldiers. He said that some kind of arrangement, similar to American ROTC, with students leaving school every year for military training, must be worked out before the schools can open.

Many of the child-soldiers themselves, while talking with chilling candor about wanting to kill those who killed their families, say they never want to return to living in the bush and fighting.

"Soldier, it is a bad thing," said a 13-year-old rebel Army corporal named Kabanda, who saw his parents shot by government soldiers. "When it is peaceful, I would not go in for being a soldier. Me, I like to drive the motor car."

Washington Post special correspondent Lindsey Hilsum contributed to this report from Kampala