As armed rebellions go, the enthusiastic revolutionaries here in Libya’s western mountains are amateurs, many schooled in battle from playing video games. They confess they sometimes fire their rifles over the heads of their enemies because they don’t like the sight of blood.

But being bad at war might turn out to be a good thing for Libya.

As a few thousand poorly armed, barely trained young rebels wearing flip-flops and soccer jerseys advance and retreat against the loyalist forces of Moammar Gaddafi, a quiet but perhaps equally important revolution is taking place here behind the front lines, where people are reassembling a society after four decades of dictatorship, trying to hammer concepts such as democracy onto ancient tribal ways.

At a checkpoint near the front lines in the town of al-Qualish, as the two sides lobbed rockets at each other, a young rebel fighter with a rifle dating from the Italian occupation in the first half of the 20th century shouted to a reporter, “Thomas Jefferson good!”

Where once there was the paranoid silence of state censorship, now there are over-caffeinated “media centers” with satellite Internet and lots of ashtrays, staffed by eager young volunteers speaking bits of Manchester English, obsessed with this brand-new thing called free Internet access.

At the Wazin border crossing with Tunisia, where the charred remains of a couple of tanks line the empty roads, the Free Libya passport control officer demanded, “Hey, friend me!”

Each of the uprisings of the Arab Spring has its own narrative and personality, and here in the mountains south of Tripoli, where Berber shepherds still tend flocks beside the crumbling walls of thousand-year-old granaries, the vibe is eager, confident, hopeful.

The rebels want to take Tripoli, they want to remove Gaddafi and his sons, but they don’t want to slaughter a lot of people to do it. That is, at least, what they say now.

“Because later, we will have to make a country together,” said Ibrahim Taher, a teacher who commands 130 men.

Members of the new city councils are as likely to quote Martin Luther King Jr. as the Koran. Rebel military commanders say they wish they didn’t have to shoot at fellow Libyans. They are slightly less squeamish about shooting at foreign fighters dragged into the conflict from poor nations such as Mali and Niger.

A common reason given for the slowness of the advance toward Tripoli?

“There are too many families in the way,” said Jamu Ibrahim, a top rebel leader in Zintan.

Whether this attitude will persist if fighting becomes more intense is hard to predict. But there are few calls for revenge or bloodletting. It is not unusual for rebel commanders to have been officers in Gaddafi’s military. Their troops accept them.

“Who knows Gaddafi best but the ones who served him? If they leave his army with pure hearts, we can use their help,” said Muftah Fitoure, a teacher who mans an antiaircraft gun, mounted in the bed of a pickup truck and repurposed to shoot horizontally. He says the first time he fired it was in battle.

Some days, it seems that half of the rebel leaders are engineers — and the other half are schoolteachers. “Most of our battalion are university graduates,” said Mabrouk Saleh, a lawyer who commands 130 men in Zintan, a center for the rebel forces, where 115 fighters have died in the five-month civil war.

With Gaddafi forces only a few miles away, there is very little yelling. Instead, there are invitations to lunch. The daytime heat is intense. Both forces nap in the afternoons and fight in the mornings and evenings.

The mountain rebels are conservative and devout; the soldiers pray at roadside berms, parade grounds and, on Fridays, at the mosque. But they do not follow firebrand clerics. “We are good Muslims, not crazy Muslims,” said Muhammad Ali, who spent his college years in Edinburgh, Scotland.

The rebels are not anti-American, but neither do they seem particularly in love with the United States. They said thank you very much when they heard the announcement last week by Secretary of State Hillary Rodham Clinton that the United States would recognize their Transitional National Council as the legitimate government of Libya. And then they got back to pestering NATO to supply them with weapons and cash.

Life is harsh but beautiful in the Nafusa Mountains. The area looks like West Texas, but with camels and smaller pickup trucks. Water comes from wells, homes are concrete bunkers, and there is no cellphone service.

But there are newspapers now — produced with a photocopier — in every town in the high, rugged plateau where there were none before.

Asked what kind of government they would like to see if Gaddafi surrenders power, a member of the Jadu transitional government, the animated Salem Badrini, said, “First, we want a country of love, where all are equal, all the same. We all say these things: We want justice, democracy and freedom, no arguments, no problems, okay?”

That is a fairly typical answer.

The first radio station in Jadu began broadcasting a few weeks ago, airing news, talk, pop and propaganda. A young disc jockey reveled in his newfound freedom to play schmaltzy pop in the ancient Berber language Amazigh, forbidden under Gaddafi.

“It is like smelling freedom. We can say what we want, speak on the radio, everything is open to us now,” said Jalid Sifaw, director of Radio Free Nafusa, 89.1 FM, whose signal reaches listeners from Tunisia to Tripoli.

The station offers advice to Gaddafi soldiers who might be tuning in. “We tell them, ‘Hey guys, stop fighting us,’ ” Sifaw said.

And just recently, the station began giving rebel soldiers religious advice, telling them how to treat prisoners and warning against looting.

Rebels here were stung by a report last week from the group Human Rights Watch, which found that in four towns captured by rebels in the past month, rebel fighters burned homes; looted hospitals, homes and shops; and beat individuals alleged to have supported government forces.

“We want to live in the middle, not at the extremes,” said Nadia Haris, who founded an association in Jadu to support the rights of her fellow Berber women. The group asked the rebels not to show their weapons on the streets or fire them in the air.

“This has a psychological effect on the children,” Haris said. “Also we want to remind everyone, this is a civil place. We are not just about guns and fighting.”