The chant "pay back the money" filtered into South Africa's highest court as judges heard a case in which President Jacob Zuma is accused of violating the constitution in a scandal over state spending on his private home.

Inside court, lawyers argued before 11 judges over whether the president broke the law by failing to follow a 2014 recommendation from the state watchdog agency that he pay back some of the more than $20 million in security upgrades to his rural home.

Outside, several thousand opposition party supporters demonstrated against what they described as corruption by the head of state, shouting that he should return state money used to improve his private home.

Mr Zuma's office, on February 3, said he was willing to reimburse some money, a U-turn to his previous position that he did nothing wrong.

His critics said he was trying to avoid the embarrassment of a court hearing and a repeat of last year's heckling during his State of the Nation address, to be held on Thursday.

"The president's capitulation is gratifying but it is not enough," said Wim Trengrove, a lawyer for the opposition - adding that the president was "pushed into a corner" after two years of legal wrangling.

Opposition parties, the Democratic Alliance and the Economic Freedom Fighters, insisted on forging ahead with the court case, saying it would set a precedent for the accountability of future presidents.

Much of the day's arguments hinged on the legal powers of the Public Protector, one of several oversight bodies created according to South Africa's 1996 constitution. Copies of the constitution were seen throughout the courtroom and were frequently consulted by those in the packed room.

The National Assembly, dominated by Mr Zuma's party - the African National Congress, is also under scrutiny for failing to hold the president to account, because a parliamentary committee absolved the president of wrongdoing.

The ministry of police released a similar report, arguing that the upgrades were essential security features. Grilled by the Constitutional Court justices, lawyers representing the president and the National Assembly acknowledged that both reports were questionable, but they would not concede that their clients breached the constitution.

Mr Zuma's lawyer, Jeremy Gauntlett, said opposition parties were using the Constitutional Court hearing to strengthen a possible case of impeachment, extending a saga "which has traumatised the nation in many ways".

Judgment was reserved in the case. It is not yet known when the justices will announce their ruling.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.