South Africa's ex-President Jacob Zuma told a judge-led inquiry that allegations of corruption against him were a "conspiracy" aimed at removing him from the political scene.
He was appearing for the first time at the inquiry, which is investigating allegations that he oversaw a web of corruption during his term in office.
His supporters cheered when he entered the building.
Mr Zuma was forced to resign as president in February 2018.
He was replaced by his then deputy Cyril Ramaphosa, who promised to tackle corruption in South Africa. Mr Ramaphosa described Mr Zuma's nine years in office as "wasted".
The allegations against Mr Zuma focus on his relationship with the controversial Gupta family, which was accused of influencing cabinet appointments and winning lucrative state tenders through corruption.
He has also been accused of taking bribes from logistics firm Bosasa, run by the Watson family.
They all deny allegations of wrongdoing.
What did Mr Zuma say?
Jacob Zuma's supporters appeared at the inquiry wearing badges to show their support for him
Looking relaxed and at times animated, Mr Zuma alleged that foreign intelligence agencies, which he did not name, were behind a decades-long plot to remove him from office.
"I have been vilified, alleged to be the king of corrupt people," Mr Zuma told the inquiry led by Judge Ray Zondo.
"I have been given every other name and I have never responded to those issues," he added.
He objected to allegations that he had allowed the state to be "captured" by the Gupta family, and had auctioned the country.
"Did I auction Table mountain? Did I auction Johannesburg?" he said.
On the eve of the hearing Mr Zuma was in a good mood. He tweeted a video of himself laughing at the chant "Zuma must fall!"
How did 'state capture' operate in South Africa?
Many of the revelations from the inquiry concern the relationship between two families – the Zumas, centred on the former president, and the Guptas, three Indian-born brothers who moved to South Africa after the fall of apartheid.
The two families became so closely linked that a joint term was coined for them – the "Zuptas".
The Guptas owned a portfolio of companies that enjoyed lucrative contracts with South African government departments and state-owned conglomerates. They also employed several Zuma family members – including the president's son, Duduzane – in senior positions.
According to testimony heard at the inquiry, the Guptas went to great lengths to influence their most important client, the South African state.
Public officials responsible for various state bodies say they were directly instructed by the Guptas to take decisions that would advance the brothers' business interests.
It is alleged that compliance was rewarded with money and promotion, while disobedience was punished with dismissal.