â€œNow we are getting into the olives,â€ he said as the road passed through groves of trees, explaining how the military has been bringing in Italian olive trees to graft on to local growersâ€™ trees to improve production. â€œSome 400 trees weâ€™ve already done.â€

He had wanted to plant daffodils, he mentioned at another point in the trip but it turned out the flowers would be too hard to export. Bee farms have proven more productive.

After battling Taliban militants in the tribal areas bordering Afghanistan for over a decade, the Pakistani military is engaged in a new fight, aiming to win over a population that is are returning to homes after years living as refugees in their country and who harbour a longstanding mistrust of the central government.

The military is rebuilding infrastructure and establishing economic and job projects for the population in South Waziristan, one of the seven tribal regions along the border with Afghanistan. Itâ€™s a classic counterinsurgency tactic similar to that used by the U.S. military â€” with mixed results â€” in Iraq and Afghanistan. The aim is to decrease support for militants and bring peace to a troubled region; in this case, itâ€™s tribal areas that have long been sanctuaries for the Taliban and other militant groups fueling instability in both Afghanistan and Pakistan.

â€œOnce the people are more aware, more educated, they will not take arms but go for the development and be a positive contributor in society,â€ Hayat said.

With a month to go before nationwide elections that will likely include a transfer of power from one elected government to another for the first time in Pakistanâ€™s history, security will be a major campaign issue. Since many of Pakistanâ€™s security problems are linked to what happens in the tribal regions, the success or failure of the counter-insurgency campaign could have major repercussions for the rest of the country.

Pakistanâ€™s battle against the Taliban began after the U.S. invasion of neighbouring Afghanistan in 2001, which pushed many militants across the border into the tribal regions of northwestern Pakistan. There, they found allies among a population historically neglected by Pakistanâ€™s central government. Much of the population is Pashtun, the ethnic group that has been the backbone of the Taliban. Working out of the tribal areas, the Pakistani branch of the Taliban launched a campaign of attacks inside Pakistan.

South Waziristan became the main sanctuary for the Pakistani Taliban, until the army launched a large ground invasion in late 2009. Amid the assault, some 300,000 of the territoryâ€™s 545,000 people fled to other parts of Pakistan. Entire villages and towns were left virtually empty, particularly in the eastern part of the territory where fighting was heaviest. But the offensive largely broke the Taliban hold, with many fighters who survived going into hiding or fleeing into Afghanistan or the neighbouring Pakistani territory of North Waziristan, which remains a militant stronghold.

â€œThe population was hostage to these people,â€ said Hayat. â€œThey had their rule of law. Whatever they wanted they could do in this area.â€

But many residents have a softer recollection of Taliban rule. Many said they didnâ€™t have a problem with the Taliban and only fled because of the fighting.

â€œDuring the Taliban time the situation was good generally. The Taliban have not done anything wrong to anyone. Pakistan and Taliban have the problem,â€ said Sami Ullah, who owns a hotel and restaurant that opened in March in Sararogha, thanks to the armyâ€™s rehabilitation efforts.

The army, which essentially runs South Waziristan now, launched the rehabilitation and rebuilding program in 2010. It has grown since, mostly in the eastern part of the territory.

But major challenges remain. Only about 15 per cent of residents who fled have been allowed to return, as the military lets them back only at the rate their towns are rebuilt.

Many of those who have returned complain about lack of compensation and services. They chafe against military restrictions. The army, for example, has stopped mobile phone services, likely to prevent the Taliban from using them to communicate or detonate bombs. No one is allowed to carry weapons, angering tribesmen who consider their rifles a symbol of independence and pride. Anyone entering or leaving South Waziristan is checked against a database of who is allowed in and who is not.

Itâ€™s also unknown when, if ever, the military will be able to hand over power to a civilian government in South Waziristan, a territory about the size of Delaware.

â€œThe progress is slow,â€ said Abdur Rahim Khan, who is running in the May 11 election for a parliament seat in a South Waziristan district. His village has not yet been resettled and most of his potential constituents are scattered around the country.

One of the militaryâ€™s most high-profile projects is the roads being built in areas previously only accessible by four-wheel drive, camel or on foot. The U.S. governmentâ€™s development arm is paying for most of the roads. Part of the plan is to open a new corridor to give traders easy access from Afghanistan to Pakistanâ€™s central Punjab province, the heart of the countryâ€™s agriculture and manufacturing.

In Sararogha, businessman Danet Khan said the new roads save time and money. On the gravel roads, the average vehicle only survived four or five years. Now the smooth two-lane highway through his village cuts travel time dramatically.

The military has built shopping areas where villagers now sell goods out of small shop fronts with roll-down metal doors painted with a green and white Pakistani flag. A barber â€” something forbidden under the Taliban â€” cuts hair in one of the stalls, although he says most residents donâ€™t need a shave because they still prefer long beards. Hayat would like to bring in a CD shop, also banned by the Taliban.

Soccer fields, schools, poultry farms and homes for widows have been built, and the military is trying to rehabilitate a leather factory sacked by the Taliban.

With few jobs at home, families here have historically survived on wages from family members sent to work in the port city of Karachi or the Persian Gulf. So the army built a vocational school to teach men skills such as computers and electricity repair. Since many people also joined the militants simply because they paid well, the school potentially deprives the Taliban of new recruits.

â€œThey donâ€™t have any opportunities. They need something to live on. Thatâ€™s why they joined the Taliban,â€ said one student studying to be an electrician, Sajjad Ahmed.

A cadet college run by Pakistani military officers was provided after requests from residents who have been starved of quality schools and plagued by an absence of decent teachers.

In the long term, the future of the region will be influenced in large part by what happens in Afghanistan. American troops are scheduled to leave at the end of 2014. Pakistani military officials worry about a repeat of the civil war that followed the 1989 withdrawal of Soviet forces.

The final goal of handing South Waziristan to a civilian government is a long way off.

â€œRight now we feel safe as long as the army is around, but I am not sure about the future,â€ said resident Malik Fareed Khan.

The tribal areas, known as agencies, have historically been regarded as a security buffer between Afghanistan and the rest of Pakistan, administered mostly by government officials appointed by Islamabad and following a different legal system from the rest of the country. That system left a legacy of neglect and a feeling among residents that they donâ€™t answer to the central government.

But for real stability, the tribal areas need to be better connected with the rest of Pakistan.

â€œThe military is playing its role but you need to answer those questions to be successful in bringing total peace,â€ said Hayat.