South Africa's highest court has ruled that a top state official charged with investigating corruption lied under oath and acted in bad faith.

It upheld a court ruling from last year that Public Protector Busisiwe Mkhwebane had acted in bad faith while investigating a bank bailout.

It is the latest controversy to hit Busisiwe Mkhwebane.

She has been accused of undermining President Cyril Ramaphosa's war against high-level corruption.

Her critics say she is being used by supporters of former President Jacob Zuma, who is facing corruption charges.

Last week, Ms Mkhwebane ruled that Mr Ramaphosa had misled parliament over a campaign donation and should be investigated, following a complaint from the Democratic Alliance opposition party.

Mr Ramaphosa said on Sunday he would be mounting a legal challenge. He denied the allegations, saying her findings were "fundamentally and irretrievably flawed".

Ms Mkhwebane has defended her work, saying it is being done according to the law and the constitution.

Many of Ms Mkhwebane's recent reports have become swamped by scandal and led to claims she is siding with Mr Zuma's faction within the governing African National Congress (ANC), says the BBC's Andrew Harding in Johannesburg.

Mr Ramaphosa replaced Mr Zuma as party leader last year after the then-president became embroiled in numerous corruption scandals.

The courts overruled Ms Mkhwebane on several occasions recently.

Why was she convicted of lying under oath?

The Constitutional Court upheld a High Court ruling that ordered Ms Mkhwebane to pay $62,000 (£50,000) in legal fees in a dispute between her office and South Africa's Reserve Bank.

Ms Mkhwebane previously denied any wrongdoing.

Reacting to the judgement on Monday, she noted that the court had not been unanimous, our reporter says.

The devastating judgement by the Constitutional Court will, however, add weight to claims that Ms Mkhwebane is involved in a dirty tricks campaign to undermine President Ramaphosa and halt his campaign against high-level corruption, our reporter says.

Source: BBC