Textbooks are strewn across the floor of the computer and math lab. Pages of science homework are stamped with footprints. A cupboard has been smashed. Bullet holes puncture computer screens and frame door locks.

The Tareq Abu Zeyad middle school lies in ruins. Villagers in this isolated, dusty hamlet in Libya's western mountains say revolutionary forces carried out the attack last week to avenge their past support for Moammar Gadhafi.

The assault, part of a series of reported attacks throughout the region, is an example of what can go wrong as Libyans struggle with how to go forward after months of brutal civil war that often pitted tribes and families against one other.

"I don't know why they would take revenge on a classroom, on a school, which should be for the public good," said Mohammed Saleh, vice principal of the middle school in this town about 110 miles (180 kilometers) southwest of Tripoli. He shuffled through the lab room, shaking his head.

Saleh is a member of the al-Meshashya tribe, which pledged its allegiance to the regime at the beginning of the revolution and harbored Gadhafi's loyalists when they fled from cities liberated by the former rebels.

The al-Meshashyas, who populate this and other villages in the area, say the attacks are particularly wrong-headed because many residents silently supported the uprising but feared publicly voicing opposition to Gadhafi. The revolution began in mid-February in the eastern city of Benghazi and then spread across the nation.

Elsewhere in Libya, other tribes that professed loyalty to Gadhafi have come under fire as well. Many members of the Twarga tribe fled Misrata during the battles for the western city. Now dozens of Twarga families live in schools in Tripoli because revolutionary forces do not allow them to return to their homes in Misrata.

The spokesman for the transitional ministry of defense, Col. Ahmed Banim, dismissed all these allegations as an attempt to tarnish the image of fighters from the town of Zintan who proved vital in last month's push into Tripoli that forced Gadhafi into hiding.

"There is a focus to make the Zintan and Misrata revolutionaries look bad, but they did the most in the struggle to rid Libya of Gadhafi, and I do not like these accusations," Bani said.

He said that tribal leaders should take the initiative to resolve any problems and warned that those complaining are trying create rifts among the revolution's supporters.

"Those who are trying to spark tribal divisions in Libya will be treated as enemies of the February 17 (revolution) and the February 17 dream," Bani told reporters Wednesday.

Ibrahim Abu Shala, a leader of the al-Meshashyas, said that Gadhafi commanders visited village elders in March to persuade them to oppose the rebellion.

Abu Shala said he then persuaded the tribe to pledge loyalty to the regime and to harbor Gadhafi loyalists. He said he accomplished this through special envoys and state media propaganda and by playing on Bedouin tribal loyalties and ancient rifts between his tribe and one in Zintan.

"Being one of the biggest tribes in the western mountains, Gadhafi used us to hold back a rebellion in this part of the country," said Abu Shala.

The regime armed families and young men with new weapons, mainly Kalashnikovs and hand-held machine guns.

Abu Shala said that those supporting the revolution were outnumbered and threatened into silence by Gadhafi fighters who used the strategic mountainous terrain as hiding locations.

But once it looked imminent that Tripoli would fall and the entire country would soon come under revolutionary command, the al-Meshashyas said they officially declared allegiance to the revolutionaries on Aug. 8 _ nearly two weeks before the rebels entered the capital.

"We heard that the revolutionaries announced that we had to hand over our arms, so we met with them and they gave us two hours to do so," said Amer Ramadan, who attended the meeting between the tribal representatives and the anti-Gadhafi rebels from Zintan.

He said the Aug. 21 meeting was very cordial but that they were given only two hours to hand over all the weapons _ even though there had not been a call from the National Transitional Council to collect weapons in the cities.

"They decided we were too slow with the handover so hundreds of them entered our villages and began rifling through our homes and destroying public property as punishment," said Ramadan.

He said the attacks began on Sept. 21 and continued for three days. Private cars and farm animals were stolen, and homes were burned.

The attack on the middle school took place at night, when children were not in class.

On Sunday, bullet holes still pockmarked the outside and inside of the expansive school, and shattered glass littered the floors.

Mahdi al-Mashi, a 30-year-old alumnus, wonders why people who call themselves revolutionaries would take out their vengeance on public property like a school.

"Many of us silently joined the February 17 revolution from the beginning but we were held hostage by the threats of the Gadhafi regime and his power," al-Mashi said. "Why do we have to pay for it in this savage way?"

Suleiman Saleh, who is from the nearby town of Mizdah, said revolutionary fighters forced his family out of their house and rifled through their belongings, accusing them of being traitors and hiding weapons.

"My mother and wife were still in the house when they barged in, and they didn't find anything because we don't have any weapons," Saleh said, speaking over the phone from his family's home.

Associated Press journalists were not allowed to enter Mizdah on Sunday by revolutionaries guarding the checkpoint into the town of some 20,000 people.

"Al-Meshashya are opponents of the new government and the revolution. They are trouble, keep away from them," said Adel Khalifa, 34, manning a checkpoint.

Saleh provided a video recording of his home, showing walls pockmarked with bullet holes and covered with anti-Gadhafi slogans. The kitchen and bathroom were destroyed _ ceramic strewn across the floor.

Two other houses were burned down in Mizdah, according to Saleh.

"We are not used to this treatment from the revolutionaries, and don't expect it," said al-Mashi, another villager.

He said he was worried that the tribes would take matters into their own hands and start attacking each other with weapons, deepening the rifts between them.

Abdullah al-Matoug, the deputy head of the local military council, said authorities were in the process of collecting all the weapons from people in the villages but that it was going to take a while to persuade people to hand them over.

"We are still new and don't have enough resources to fend off attacks like the ones here," said al-Matoug. He sat in a cramped office of an old police station in al-Shegaiga, more than a dozen automatic weapons in a pile behind him.

Outside the makeshift council office where children hung the new Libyan flag and spray-painted the word "Free Libya" on the outside, a man said he expected a new civil war to break out between the tribes.

"These revolutionaries are now operating like a bunch of armed gangs," he shouted. "There is no order, no law, and the NTC is doing nothing to help _ a new civil war will start again."

The man, who refused to give his name, was silenced by his friends. An AP reporter was asked to ignore his comments.