In the alley winding between the earthen walls of Old Kabul, Wakil Mohammad Saddeq insists on honouring his visitors with a cup of tea. "You are the first to offer us help without asking for money!" he says.

Wakil's home is one of thousands of unregulated houses stuffed into the Afghan capital, whose boundaries have long overflowed as refugees fleeing war are added to a surging young population.

Now Kabul authorities are trying to bring order to the snarl of informal housing, as President Ashraf Ghani seeks to equip the city with a cadastre, or land registry, for the first time in its history.

"Here, urbanisation has been guided by conflicts and humanitarian crises," says Koussay Boulaich, head of communication at UN-Habitat, which is running the project in partnership with the Kabul government.

"The only attempt at urban planning dates from the Soviets" in the late 1970s, he notes.

Today, Kabul has more than four million inhabitants. Nearly 40 years of conflict have driven hundreds of thousands of people from rural areas into the shelter of the capital, creating entire new neighbourhoods without plans or records.

The majority of their inhabitants live with no safety net, at the mercy of an overnight eviction.

And the influx shows no sign of slowing down. Since early 2015, cities across Afghanistan including Kabul have received a total of more than 2.5 million people displaced by war.

"Of the 255,000 properties already assessed in Kabul by UN-Habitat, only 15 percent have a valid title deed, 41 percent have documents without legal value and 44 percent have no documents at all," says Boulaich.

Neighbourhood watch 

Most of the fragile houses that tumble up the dusty foothills surrounding Kabul are unregulated. Many are built of mud and lack electricity and running water.

But informal housing also encompasses ancient houses such as Wakil's, and the opulent, expensive villas on clean, paved streets in Kabul's wealthy areas.

In the absence of any owner, residents who can prove they have been in a property for at least 15 years are granted a certificate of occupation.

To find owners, the UN-Habitat team first checks with the municipality and its archives, then with neighbours, explains Sayed Sadullah Wahab, coordinator for the "City for All" programme.

If no owner is found, they post a certificate of occupancy that is valid for five years at the local mosque.

"After five years, if nobody claims it the tenant will get the full property," he said.

Once the neighbours are questioned, any existing owner usually pops up within days, even if he is as far away as the United States or Germany, he adds.

"The neighbours call him," he explains with a smile.

Where the streets have no name 

AFP accompanied Wahab's team of investigators to another house. Salim Ahmad, the owner, was killed last year by the Taliban, so it is his father-in-law who comes to justify the family's right to the land.

But their acquisition has never been validated, and titles laminated with care have no legal value.

The UN-Habitat team records the documents, the electricity bills, the identity of the occupants, and takes measurements of the land and the house. This data will be used to establish the occupancy certificate and the amount of house tax, or safayi.

President Ghani has already distributed the first certificates in Kabul, as well as in the western city of Herat and the eastern city of Jalalabad.

For the first time in Afghanistan's history they are being awarded to women as well as men. Currently, the UN says, women account for just five percent of the recognised landowners in the country.

UN-Habitat has 1,200 employees on the project and a budget of $63 million until 2020, funded by the European Union and the US development agency, USAID.

After so many years of conflict and lawlessness, the project is encountering challenges from residents who do not trust that paying safayi will benefit them, says Hellay Ishaqzai, 25, one of the team's investigators.

However, an awareness campaign to illustrate how the funds are being used in each neighbourhood is paying off.

Through it, women, the elderly, even children can vote for the money to be used in different ways, such as maintaining roads or schools.

The programme will also see the confusing mass of thoroughfares clearly named, an innovation set to revolutionise navigation in a city where most directions are given by way of landmarks: behind the supermarket, second right after the mosque, left of the blue door, and so on.

Wahab says that $1.4 million has been collected since November.

Back in Kabul's old quarter, Saddeq's family have paid their sayafi -- 800 afghanis, or $12 -- for the first time in 90 years.

He rejoiced in the payment. "They will come and clean our streets, they will remove the dirty water, and we also wish to have a clinic," he says hopefully.