QUETTA, Pakistan (AP) _ When he was 8 years old, a schoolmate says, Mir Aimal Kansi became enraged at a teacher. Sneaking into school late one night, he set fire to the classroom.

The wealth and tribal connections of Kansi's family protected him then, friends say, and 20 years later, they may well protect him from the CIA.

When it became known that Kansi was sought for the Jan. 25 shooting that killed two people and injured three outside CIA headquarters in northern Virginia, Pakistani intelligence agents in his hometown were baffled. Kansi had never had a scrape with the law.

Many of those who knew Kansi regarded him as a pampered rich boy whose frustration over family problems sometimes exploded into rage.

But word of the CIA killings transformed him, in the eyes of some Quetta citizens, into a hero of the Kansi, a Muslim tribe whose members live in Pakistan, southern Afghanistan and Iran.

In this city of 285,000, a base for the CIA's covert aid operation during the 14-year Afghanistan war, the agency is blamed for most anything bad that happens. Although the CIA was aiding Muslim guerrillas in Afghanistan, many people in predominantly Muslim Pakistan see the agency as an enemy of Islam.

Rehmat Kansi, a member of the Kansi tribe but not a close relation, said he would gladly die fighting to protect Mir Aimal Kansi, whom he regarded as a hero.

Kansi's family is among the richest in the tribal-run province of Baluchistan. They own a large hotel, a popular restaurant, vast tracts of land, and industries in Karachi, Pakistan's biggest city.

The only child of his father's second wife, Kansi grew up feeling unwanted, say his friends.

When his mother died in 1980, he felt isolated, they said, and his world collapsed in 1989 with the cancer death of his father, Haji Abdullah Jan.

A classmate of Kansi's at Baluchistan University, where Kansi graduated in 1988 with a masters degree in English literature, remembered Kansi as moody and temperamental.

''He seemed to be psychologically disturbed,'' said Shazada Zulfikar. ''It might have been because of his mother's death.''

Some older friends said the tantrums predated Kansi's mother's death.

Asif Bugti recalled that Kansi sneaked into their fourth grade classroom late one night and set it ablaze. The teacher had scolded him earlier in the day, Bugti said, and Kansi was furious.

Because of the Kansi code of honor, nobody reported him to the school, Bugti said.

Within months of his father's death, Kansi left for Germany, where he stayed for three months. He refused to tell his family what he was doing, and was secretive and bitter on his return, said Hameedullah, the oldest of three stepbrothers.

''He was not on talking terms with us,'' said the youngest stepbrother, Mir Wais.

Shortly after his return, Kansi asked his stepbrothers to divide up the family wealth, giving him his share to finance his move to the United States.

The stepbrothers refused.

Kansi angrily left Quetta in March 1991 with about $11,500 in cash. In the United States, he found work as a courier with a company named Excel, owned by Chris Marchetti, the son of Victor Marchetti, a senior CIA employee in the 1960s who later became an outspoken critic of the agency.

His family knew nothing of his life in America. Kansi did not send his address and only rarely telephoned, said Hameedullah.

Shortly after the CIA shootings were reported, Kansi reappeared in Quetta, but slipped away a few days later.

Few people seem interested in helping the police find Kansi.They speak in whispers outside his fortress-style family home, fearful that the CIA is somehow listening in.

Some say Kansi is a misunderstood tribesmen hounded by xenophobic America. It is likely that Kansi has sought sanctuary among his tribesmen, who are bound by a strict code to shelter any member seeking protection. Kansi may be in fundamentalist Iran, friends say.

To his closest relatives, Kansi is a source of shame.

''It would be a cause of great shame and dishonor for our family if he has committed the murder,'' said Mir Wais.