A white South African farmer whose land was invaded by 40,000 squatters has been awarded compensation by the country's highest court.
Land rights are a contentious issue across Africa
Braam Duvenhage was entitled to damages from the state because it had failed to protect him from the land invasion, the Constitutional Court ruled.
Police refused to intervene after the squatters occupied part of his family's farm at Modderklip, near Johannesburg.
The case has been seen as a test case of farmers' property rights.
Disregarding farmers' rights was "a recipe for anarchy", the ruling said.
Eleven years after the end of apartheid, white farmers still own much of South Africa's most fertile land but the government says it will not forcibly seize land, as in neighbouring Zimbabwe.
The amount of compensation has not yet been set and the state can appeal against the decision.
The ruling by acting Chief Justice Pius Langa comes after a five-year legal battle by Mr Duvenhage, which began when 400 squatters moved onto his land in mid-2000.
The numbers grew steadily and the area - consisting of 50 hectares of the 2,400-hectare farm - is now known as the Gabon informal settlement.
"I find that it was unreasonable of the state to stand by and do nothing in circumstances where it was impossible for Modderklip to evict the occupiers because of the sheer magnitude of the invasion and the particular circumstances of the occupiers," the judge said.
He said the family were entitled to compensation, to be backdated to 31 May 2000 and paid by the Department of Agriculture and Land Affairs.
He also ruled that the squatters could stay on the land until alternative accommodation was made available by the authorities.