Kenyan authorities have begun to move residents out of Africa's largest slum - the Kibera settlement in Nairobi.
Officials expect to take from two to five years to clear the slum, which is home to about one million people.
The first people to move are being rehoused nearby in 300 newly built apartments, each paying about $10 (£6) a month in rent.
But some residents and landlords have gone to court in a bid to stop the moves as they claim they own the land.
People in Kibera have had to cope with overcrowding, soaring crime rates and poor sanitation in recent years.
Prime Minister Raila Odinga, who is the local MP, said the the project - which has UN backing - will prepare the ground for a "modern, low income residential estate with modern schools, markets, playgrounds and other facilities".
"Today we make the first step of a long journey towards meeting the basic needs and basic human rights of our people in the slum," he said.
The BBC's Anne Mawathe in Kibera said some families began moving with their belongings at 0630 local time.
They assembled to wait for trucks to take them to their new homes.
One elated resident, Hilda Orlale, told the BBC how she and her family could not wait to get to their new home.
"Where we lived we never even had a toilet," she said.
"We had to pay three shillings (three US cents) to access one while the children used the flying toilets," she said referring to excrement that is placed into plastic bags and then thrown out of windows.
But our reporter says land ownership in Kenya is very sensitive, and not everyone is happy with the scheme.
More than 80 people - a mix of landlords and residents - have taken their grievance to court, arguing that the land in Kibera is theirs and the government should not be allowed to demolish the shacks.
About 90% of Kibera residents rent their homes from middle-class Kenyans who have built temporary structures on the government land over the last 30 years.
The Nubian community - an ethnic group who have been living on the land for more than a century - are also annoyed with the slum clearance.
Ibrahim Diaby, a Nubian elder, says improvements should be made to the existing housing in the slum instead.
"My house has water and electricity, but I'm restricted from putting up a permanent building because the government says the land belongs to them," he said.
"It's a question of natural justice. We've lived in Kibera long before Nairobi was Nairobi, long before Kenya was Kenya."
The high court has ordered that the demolition cannot begin until their case is heard next month.
Mr Odinga said the slum now houses many more people than the Nubians, and must be redeveloped.
"Over the years, it has grown to be cosmopolitan with many Kenyan communities found here," he said.
"But it also remains the biggest slum in Africa south of the Sahara. It is not a reputation we can be proud of."
Urban planners have also expressed concern at the project, saying that it risks repeating the mistakes of the past.
In another similar project poor families either shared two-roomed apartments with one or two other families in order to pay the rent, or sub-let them to middle-class families and moved back into the slums.