An inquiry by the South African government has cleared President Jacob Zuma of abusing state money to upgrade his private residence.
The improvements were needed for security reasons, said Public Works Minister Thulas Nxesi.
A provisional report by South Africa’s ombudsman is said to have urged Mr Zuma to repay some of the $20m (£12m) cost.
The refurbishment of his Nkandla home has turned into a major political controversy in South Africa.
It was one of the reasons why Mr Zuma was booed at the memorial service of Nelson Mandela, South Africa’s first black president, in Johannesburg last week, correspondents say.
Many people accuse their leaders of leading lavish lifestyles, while they continue to live in poverty nearly 20 years after white minority rule ended.
Mr Zuma is expected to lead the governing African National Congress (ANC) into elections next year, but some influential members of the party have been been lobbying for him to be replaced, correspondents say.
“No state funds were used to build the president’s private residence,” said Mr Nxesi as he released the findings of a government investigation into the upgrade.
Mr Nxesi said the government had spent money on the house, in the rural district of Nkandla in South Africa’s KwaZulu-Natal province, for security reasons.
“The violent history of this area of KwaZulu-Natal, the fact that the Zuma homestead and family members had previously been attacked on three occasions, and the fact that the president has to conduct government functions, such as receiving official delegations, necessitated major security upgrades,” he added.
Last month, South Africa’s ombudsman – or public protector, Thuli Madonsela – condemned the local Mail and Guardian newspaper for publishing her provisional report into the upgrade.
Ms Madonsela found Mr Zuma had derived “substantial benefits” from the upgrade, the Mail and Guardian said.
The upgrades included a visitors’ lounge, amphitheatre, cattle enclosure, swimming pool and houses for the president’s relatives, it added.
Mr Zuma has repeatedly denied any wrongdoing.
Ms Madonsela said it was “unethical and unlawful” for the media to publish a leaked provisional report.
It is not clear when exactly she plans to release the report.
The government has gone to court, seeking to block its release